Subscribing a queue to an Amazon SNS topic using the Amazon SQS console - Amazon Simple Queue Service

Subscribing a queue to an Amazon SNS topic using the Amazon SQS console

You can subscribe one or more Amazon SQS queues to an Amazon Simple Notification Service (Amazon SNS) topic. When you publish a message to a topic, Amazon SNS sends the message to each of the subscribed queues. Amazon SQS manages the subscription and any necessary permissions. For more information about Amazon SNS, see What is Amazon SNS? in the Amazon Simple Notification Service Developer Guide.

When you subscribe an Amazon SQS queue to an SNS topic, Amazon SNS uses HTTPS to forward messages to Amazon SQS. For information about using Amazon SNS with encrypted Amazon SQS queues, see Configure KMS permissions for AWS services.

Important

Amazon SQS supports a maximum of 20 statements per access policy. Subscribing to an Amazon SNS topic adds one such statement. Exceeding this amount will result in a failed topic subscription delivery.

To subscribe a queue to an SNS topic (console)
  1. Open the Amazon SQS console at https://console.aws.amazon.com/sqs/.

  2. In the navigation pane, choose Queues.

  3. From the list of queues, choose the queue to subscribe to the SNS topic.

  4. From Actions, choose Subscribe to Amazon SNS topic.

  5. From the Specify an Amazon SNS topic available for this queue menu, choose the SNS topic for your queue.

    If the SNS topic isn't listed in the menu, choose Enter Amazon SNS topic ARN and then enter the topic's Amazon Resource Name (ARN).

  6. Choose Save.

  7. To verify the result of the subscription, publish to the topic and then view the message that the topic sends to the queue. For more information, see Amazon SNS message publishing in the Amazon Simple Notification Service Developer Guide.

If your Amazon SQS queue and SNS topic are in different AWS accounts, the topic owner must first confirm the subscription. For more information, see Confirm the subscription in the Amazon Simple Notification Service Developer Guide.

For information on subscribing to a cross-region SNS topic, see Sending Amazon SNS messages to an Amazon SQS queue or AWS Lambda function in a different Region in the Amazon Simple Notification Service Developer Guide