Amazon SNS to Amazon SQS

SNS → SQS

Create an SQS queue that subscribes to an SNS topic.

This sample project demonstrates how to use a SQS queue to receive messages published on a SNS topic.
This pattern creates the following resources: SNS topic, SQS queue, SNS topic subscription with SQS protocol, SQS queue resource policy for SNS to push messages.
This pattern can combined with any pattern using SQS as source to build the infrastructure answering the desired goal, for example SQS to Lambda pattern.

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

Deploy

terraform initterraform apply --auto-approve


Testing

See the GitHub repo for testing instructions.

Cleanup

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

Created by:

Nicolas Diez

Nicolas Diez

AWS Proserve Consultant. I want to use all the competences gained during my experiences to deliver efficient cloud architectures to customers.

Follow on LinkedIn