Code Repository: https://github.com/idelfonsog2/aws-s3-lambda-hanlder
With this project, I can demonstrate a Lambda function that is triggered and processes events based on the s3:ObjectCreated event.
We are in the process of breaking down our monolithic application into separate container images. For further development in a serverless environment, some components (managed services) may tightly bind you to a specific cloud provider, while others can be migrated easily.
Enclosed, you'll find the CI/CD file (staging.yml), which was built using GitHub Actions and the Serverless Framework (https://www.serverless.com). The Lambda function has been containerized within a Docker image. Should you prefer a zip package, you can use the following method:
ZIP files can accommodate up to 256 MB, whereas Docker images can be as large as 10 GB. Lambda layers cannot be utilized by container images. For instance, I employ a layer to decompress private key files and to reuse initialization code, among other tasks.
I've crafted the following resources using a YAML template for AWS CloudFormation Stack consumption to achieve this.
For more details on the output, look at the README sections: https://github.com/idelfonsog2/aws-s3-lambda-hanlder/blob/main/README.md