Amazon DynamoDB Streams to AWS Lambda Durable Function

Amazon DynamoDB → AWS Lambda durable function → Amazon DynamoDB

Change data capture pipeline using DynamoDB Streams and Lambda durable functions with checkpointed validate, enrich, and notify steps.

This pattern processes DynamoDB stream events through a multi-step pipeline using Lambda durable functions.
When items are written to the source DynamoDB table, streams trigger a durable function that validates, enriches, and sends notifications for each record.
Each step is checkpointed. If the function is interrupted during processing, it resumes from the last checkpoint without re-executing completed steps.
Uses ReportBatchItemFailures for partial batch error handling so successfully processed records are not retried.
The function is deployed with AutoPublishAlias to meet the qualified ARN requirement for event source mappings with durable functions.

< 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/lambda-durable-ddb-streams/python/sam

Deploy

sam buildsam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete.

Created by:

Ajaya Shrestha

Ajaya Shrestha

Cloud Support Engineer at AWS specializing in Lambda and serverless architectures.