ExitAmazon SQS: queue policies for event delivery1 / 9
Explanationassociate9 steps · 4 exercises

Separate subscribing from delivering

Use an SQS queue policy to authorize delivery from a specific SNS topic, including subscriptions that cross account or Region boundaries.

An SNS subscription names the SQS queue that should receive messages from a topic. Setting up that subscription and delivering a message through it are separate operations. They have different callers and different destinations.

In this example, the topic and queue are in different accounts and Regions. The diagram shows both the setup request and the later delivery request. The policy to check depends on which request you are following.

Account A · us-east-1
Account B · us-west-2
Subscribe requestSendMessage request
Queue owner's AWS CLI (Account B)AWS Command Line Interface (AWS CLI)
Orders topic · Topic policy allows Account B to subscribeAmazon Simple Notification Service (Amazon SNS)
Orders queue · Queue policy allows SNS delivery from the Orders topic ARNAmazon Simple Queue Service (Amazon SQS)

Stage 1 of 4: The queue owner uses the AWS CLI with Account B credentials to request the subscription.

Next up: Complete the diagram on what you just read.

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.