Deploy AWS Lambda functions with container image

Amazon S3 → AWS Lambda

This sample project demonstrates how to deploy an AWS Lambda function with a container image that gets triggered when a new object is created in an Amazon S3 bucket

When a file is uploaded to a specific Amazon S3 bucket. The create object event from S3 triggers the AWS Lambda function. The Lambda function uses a container image instead of a zip file. The function reads the content of the file uploaded into the S3 bucket.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/s3-lambda-container-sam

Deploy

bash build.shsam deploy -g


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the Amazon S3 email bucket content: aws s3 rm s3://{SampleFunction} --recursive --region {your-region}
Delete the resources deployed to your AWS account via AWS SAM: sam delete

Created by:

Biswanath Mukherjee

Biswanath Mukherjee

Sr. Solutions Architect working at AWS India.

Follow on LinkedIn