Amazon S3 to AWS Lambda to Amazon DynamoDB

Amazon S3 → AWS Lambda → Amazon DynamoDB

Upload object data from Amazon S3 to Amazon DynamoDB via AWS Lambda.

This pattern in Terraform offers a complete solution to load data from JSON files stored on S3. The following resources are created:
- S3 Bucket with event notification on object creates
- DynamoDB Table with on-demand billing mode
- Lambda function that runs python and takes environment variables of bucket name, and DynamoDB table

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

Deploy

terraform initterraform apply --auto-approve


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: terraform destroy --auto-approve.

Additional resources

Created by:

Sarika Subramaniam

Sarika is a Solutions Architect at Amazon Web Services based in London.

Follow on LinkedIn