Is it possible to create a 'Subscription' resource in a AWS CloudFormation JSON template without creating a new AWS::SNS::Topic
?
In my case, the topic is created outside of the CloudFormation script, and I would like to create some subscriptions to it, involving resources created within the script.
I.E.
"DbfExtractQueue": {
"Type": "AWS::SQS::Queue"
},
"EtlSubscription": {
"Type": "AWS::SNS::Subscription",
"Properties": {
"Endpoint": { "Fn::GetAtt": ["DbfExtractQueue", "Arn"] },
"Protocol": "sqs",
"TopicArn": { "Ref": "EtlNotificationTopicARN" }
}
},
The EtlNotificationTopicARN is passed into the script and represents a SNS topic ARN.