Amazon SNS to Amazon SQS fanout pattern

Amazon SNS → Amazon SQS → Amazon SQS → Amazon SQS

Fanout pattern using Amazon SNS and Amazon SQS. Subscription filters are used to route SNS topics to the the correct SQS queue.

Three SQS queues subscribe to the SNS topic. The topic routing logic is defined through the subscription filter policy.
The AllMetricsSqsQueue queue receives all the messages. The TemperatureSqsQueue queue receives Temperature messages and the HumiditySqsQueue queue receives Humidity messages.

< 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/sns-sqs-fanout

Deploy

sam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

sam delete.

Additional resources

Created by:

Biswanath Mukherjee

Biswanath Mukherjee

Sr. Solutions Architect working at AWS India.

Follow on LinkedIn