Amazon Simple Queue Service
Developer Guide (API Version 2012-11-05)
« 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...

Appendix C: Subscribe Queue to Amazon SNS Topic

You can now subscribe an Amazon SQS queue to an Amazon SNS topic using the AWS Management Console for Amazon SQS, which simplifies the process. For example, you can choose from the list of available topics for the selected queue. Amazon SQS then manages the subscription of the queue to the topic and the addition of the necessary permissions. When a message is published to the topic, Amazon SNS sends an Amazon SQS message to the subscribed queue. For more information about Amazon SNS, see Get Started with Amazon SNS. For more information about Amazon SQS, see Get Started with Amazon SQS

Subscribe Queue to Amazon SNS Topic with the AWS Management Console

The following steps assume you have already created a queue and an Amazon SNS topic.

To subscribe a queue to an Amazon SNS topic with the AWS Management Console

  1. Sign in to the AWS Management Console and open the Amazon SQS console at https://console.aws.amazon.com/sqs/.

  2. Select the queue to which you want to subscribe an Amazon SNS topic.

    AWS Management Console Select Queue
  3. Select Subscribe Queue to SNS Topic from the Queue Actions drop-down list.

    AWS Management Console Queue Actions
  4. From the Choose a Topic drop-down list, select an Amazon SNS topic to subscribe the queue to and then click Subscribe.

    Note

    You can also enter the ARN of the Amazon SNS topic in the Topic ARN: box. This is useful when you want to subscribe the queue to an Amazon SNS topic from an AWS account other than the one you used to create the queue. It's also useful if the Amazon SNS topic is not listed in the Choose a Topic drop-down list.

    Choose a Topic.
  5. In the Topic Subscription Result dialog box, click OK.

    AWS Management Console Topic Subscription Result dialog box.

You can verify the results of the topic's queue subscription by publishing to the topic and viewing the message that the topic sends to the queue. For detailed steps, see Test it out by publishing a message to the topic and reading the message from the queue.