How to create and subscribe an Amazon SQS queue to an Amazon SNS topic in AWS CloudFormation?
- SNS topic name = T1
- SQS queue name = Q1
I need a template in JSON or YAML
Pease help me.
How to create and subscribe an Amazon SQS queue to an Amazon SNS topic in AWS CloudFormation?
I need a template in JSON or YAML
Pease help me.
Here is an example from Create a Subscription Between an Amazon SQS Queue and an Amazon SNS Topic in AWS CloudFormation:
Parameters:
SNSTopicARN:
Type: String
Description: awsSNSTopicArnExample
TopicRegion:
Type: String
Description: us-east-1
Resources:
Queue:
Type: AWS::SQS::Queue
SnsSubscription:
Type: AWS::SNS::Subscription
Properties:
Protocol: sqs
Endpoint: !GetAtt Queue.Arn
Region: !Ref TopicRegion
TopicArn: !Ref SNSTopicARN