Message Aggregator with Amazon SQS, AWS Lambda and Amazon DynamoDB

Amazon SQS → AWS Lambda → Amazon DynamoDB → Amazon SQS

Creates a Lambda function that groups and tracks messages using DynamoDB. Once messages are aggregated a new message is raised on a destination SQS queue.

This CDK project demonstrate how to create a Message Aggregator pattern using Amazon SQS, AWS Lambda and Amazon DynamoDB.
The solution creates a source and a destination SQS Queue and a Lambda function that keeps track of the messages by leveraging a DynamoDB Table.
This architecture is an implementation of the Integration pattern: Message Aggregator explained in the Integration Patterns book.

< 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-message-aggregator-cdk

Deploy

cdk deploy


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: cdk destroy.

Additional resources

Created by:

Raffaele Garofalo

Raffaele Garofalo

Raffaele Garofalo (Raf) is a Senior Solutions Architect at AWS and member of the AWS Serverless TFC (Technical Field Communities).

Follow on LinkedIn