Amazon Simple Notification Service
API Reference (API Version 2010-03-31)


Creates a topic to which notifications can be published. Users can create at most 100,000 topics. For more information, see This action is idempotent, so if the requester already owns a topic with the specified name, that topic's ARN is returned without creating a new topic.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.


The name of the topic you want to create.

Constraints: Topic names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long.

Type: String

Required: Yes

Response Elements

The following element is returned by the service.


The Amazon Resource Name (ARN) assigned to the created topic.

Type: String


For information about the errors that are common to all actions, see Common Errors.


Indicates that the user has been denied access to the requested resource.

HTTP Status Code: 403


Indicates an internal service error.

HTTP Status Code: 500


Indicates that a request parameter does not comply with the associated constraints.

HTTP Status Code: 400


Indicates that the customer already owns the maximum allowed number of topics.

HTTP Status Code: 403



Sample Request ?Name=My-Topic &Action=CreateTopic &SignatureVersion=2 &SignatureMethod=HmacSHA256 &Timestamp=2010-03-31T12%3A00%3A00.000Z &AWSAccessKeyId=(AWS Access Key ID) &Signature=gfzIF53exFVdpSNb8AiwN3Lv%2FNYXh6S%2Br3yySK70oX4%3D

Sample Response

<CreateTopicResponse xmlns=""> <CreateTopicResult> <TopicArn>arn:aws:sns:us-east-1:123456789012:My-Topic</TopicArn> </CreateTopicResult> <ResponseMetadata> <RequestId>a8dec8b3-33a4-11df-8963-01868b7c937a</RequestId> </ResponseMetadata> </CreateTopicResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: