Amazon DynamoDB Stream to AWS Lambda using CDK in Kotlin

Amazon DynamoDB → AWS Lambda

Create an AWS Lambda function that receives DynamoDB change items.

This CDK application demonstrates how to establish an Amazon DynamoDB table stream, an AWS Lambda function, and the minimal IAM permissions needed for the application to function properly.
When items are inserted or updated in a 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.
The application was made using Kotlin for both the CDK and Lambda code.

< 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-lambda-cdk-kotlin

Deploy

cdk deploy


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: cdk delete.

Created by:

Sidharta Rezende

Sidharta Rezende

Sidharta Rezende is a Senior Cloud Application Architect at Amazon Web Services, based in Brazil

Follow on LinkedIn