IoT rule to Amazon SNS topic to Amazon SQS queue

IoT → SNS → SQS

IoT Rule with a SNS action, a SNS Topic and a SQS standard Queue subscribed to the SNS topic.

This pattern contains a sample AWS CDK stack to create an IoT Rule with a SNS action, a SNS Topic and a SQS standard Queue subscribed to the SNS topic.
When a message is published to the IoT topic defined in the IoT Rule, this message will be published to the SNS topic and then the message will be delivered to the SQS queue subscribed to the SNS topic.

< 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/iot-sns-sqs-cdk

Deploy

cdk deploy


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

1. Delete the stack: npx cdk destroy.
2. Confirm the stack has been deleted: aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus".
3. You see a message confirming DELETE_COMPLETE.

Created by:

Patrick Malatesta

Patrick Malatesta

Cloud Infrastructure Architect at AWS Professional Services