AWS CloudFormation
User Guide (API Version 2010-05-15)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

AWS::SNS::Topic

The AWS::SNS::Topic type creates an Amazon SNS topic.

Syntax

{
   "DisplayName" : String,
   "Subscription" : [ SNS Subscription, ... ]
}     

Properties

DisplayName

A developer-defined string that can be used to identify this SNS topic.

Required: No.

Type: String.

Subscription

The SNS subscriptions (endpoints) for this topic.

Required: Yes.

Type: List of SNS Subscriptions

Return Values

Ref

When the logical ID of this resource is provided to the Ref intrinsic function, it returns the resource name.

For more information about using the Ref function, see Ref.

Examples

An example of an SNS topic subscribed to by two SQS queues:

"MySNSTopic" : {
   "Type" : "AWS::SNS::Topic",
   "Properties" : {
      "Subscription" : [
         { "Endpoint" : { "Fn::GetAtt" : [ "MyQueue1", "Arn" ] }, "Protocol" : "sqs" },
         { "Endpoint" : { "Fn::GetAtt" : [ "MyQueue2", "Arn" ] }, "Protocol" : "sqs" }
      ]
   }
}     

See Also