AWS CloudFormation
User Guide (API Version 2010-05-15)
Did this page help you?  Yes | No |  Tell us about it...
« 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.


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


  "Type" : "AWS::SNS::Topic",
  "Properties" : {
    "DisplayName" : String,
    "Subscription" : [ SNS Subscription, ... ],
    "TopicName" : String



After you create an Amazon SNS topic, you cannot update its properties by using AWS CloudFormation. You can modify an Amazon SNS topic by using the AWS Management Console.


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

Required: No

Type: String

Update requires: Updates are not supported.


The SNS subscriptions (endpoints) for this topic.

Required: No

Type: List of SNS Subscriptions

Update requires: Updates are not supported.


A name for the topic. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the topic name. For more information, see Name Type.

Required: No

Type: Name Type

Update requires: Updates are not supported.

Return Values


For the AWS::SNS::Topic resource, the Ref intrinsic function returns the topic ARN, for example: arn:aws:sns:us-east-1:123456789012:mystack-mytopic-NZJ5JSMVGFIE.

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


Fn::GetAtt returns a value for a specified attribute of this type. This section lists the available attributes and corresponding return values.


Returns the name for an Amazon SNS topic.

For more information about using Fn:GetAtt, see Fn::GetAtt.


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" }
      "TopicName" : "SampleTopic"

See Also