Split Amazon SQS messages into multiple SQS queues using Amazon EventBridge Pipes

SQS → eventbridge-pipes → AWS Lambda → SQS

Simple pattern that split messages in a SQS queue into multiple SQS queues using EventBridge Pipe and Event Bus. Implemented using CDK using Python.

EventBridge Pipe polls messages in source SQS queue. Then using enrichment Lambda function, it extract the original payload.
Then the messages is sent to the Event Bus. Two SQS queues are set as targets and based on the 'type' value on the orignial message, it will be delivered to the respective target queue.

< 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/eventbridge-pipes-sqs-to-multiple-sqs

Deploy

cdk deploy


Testing

See the README in the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: cdk destroy.

Created by:

Pubudu Jayawardana

Pubudu Jayawardana

AWS Community Builder in Serverless category. Serverless advocate and enthusiast.

Follow on LinkedIn