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-tf

Deploy

terraform initterraform apply


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

terraform destroy
terraform show

Additional resources

Created by:

Makendran G

Makendran G

Cloud Support Engineer @ AWS

Follow on LinkedIn