Amazon S3 to AWS Lambda

S3 → AWS Lambda

Create a Lambda function that receives events from S3.

The Terraform template deploys a Lambda function, an S3 bucket and the IAM resources required to run the application. A Lambda function consumes ObjectCreated events from an Amazon S3 bucket. The Lambda code checks the uploaded file and console log the event.

< 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-terraform

Deploy

terraform initterraform deploy


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

1. Change directory: s3-sqs-terraform.
2. Delete the stack: terraform destroy.
3. Confirm the stack has been deleted: terraform show.

Created by:

Ezzeddine El Ayoubi

Ezzeddine El Ayoubi

Devops Cloud Engineer (via Passionate People) at IKEA

Follow on LinkedIn