Amazon DynamoDB Stream to AWS Lambda with filters

Amazon DynamoDB → Amazon DynamoDB Streams → AWS Lambda

This pattern demonstrates how a Lambda function can get triggered when there is a new event in a DynamoDB stream using filters.

For this example, a new event in a DynamoDB stream triggers a Lambda function based on a filter. The created stack has one DynamoDB table with streams enabled and 4 Lambda functions configured with ESM filters:
1. Bachelors Lambda (process-bachelors-request) - Triggers for every insert of Bachelors Record
2. Masters Lambda (process-masters-requests) - Triggers for every insert of Masters Record
3. Modify Lambda (process-modify-request) - Triggers for any updates
4. Delete Lambda (process-delete-request) - Triggeres for any remove

< 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-filters-tf

Deploy

terraform initterraform apply


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

terraform destroy

Additional resources

Created by:

Sakthivel Chellapparimanam

AWS - Cloud Application Architect

Follow on LinkedIn

Rachel Hanspal

AWS - Associate Cloud Applications Developer

Follow on LinkedIn