Amazon SQS to AWS Lambda to Amazon DynamoDB

SQS → AWS Lambda → Amazon DynamoDB

Create a Lambda function that batch writes to DynamoDB from SQS.

This pattern deploys an SQS queue, a Lambda Function, and a DynamoDB table allowing batch writes from SQS messages to a DynamoDB. The CDK application contains the minimum IAM resources required to run the application.

< 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/sqs-lambda-dynamodb-cdk

Deploy

cdk deploy


Testing

See the GitHub repo for testing instructions.

Cleanup

1. Delete the stack: npx cdk destroy.
2. Confirm the stack has been deleted: aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus".
3. You see a message confirming DELETE_COMPLETE.

Created by:

Paulo Beleza Heneine

Paulo Beleza Heneine

Developer since Cobol times, always in touch with new languages and platforms. Senior Mainframe Modernization Architect @ AWS.

Follow on LinkedIn