Amazon SQS to AWS Lambda to Amazon DynamoDB

Amazon 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, using SAM and Java 11.

< 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-sam-java

Deploy

See the GitHub repo for deployment instructions


Testing

See the GitHub repo for testing instructions.

Cleanup

1. Delete the stack: sam delete --stack-name STACK_NAME.
2. Confirm the stack has been deleted: aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus"

Created by:

Razvan Minciuna

Razvan Minciuna

Software Architect.

Follow on LinkedIn