Amazon DynamoDB to AWS Lambda

Amazon DynamoDB → AWS Lambda

Invoke a Lambda function from changes to a DynamoDB table using event-based filters

The Terraform template deploys a Lambda function, a DynamoDB table, and the minimum IAM resources required to run the application.
When items are written or updated in the DynamoDB table, the changes are sent to a stream. This pattern configures a Lambda function to poll this stream. The function is invoked with a payload containing the contents of the table item that changed.

< 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/dynamodb-streams-lambda-terraform-java

Deploy

terraform initterraform apply


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

1. Delete the stack: terraform destroy.
2. 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

Steven Cook

Senior Solutions Architect at AWS.