Start with distribution or processing
When to choose SNS push-based distribution to subscribers rather than SQS queues that consumers poll to process messages. · associate
Amazon SNS distributes notifications using a topic. A publisher sends a message to the topic, and SNS pushes it to subscribed endpoints. Choose this model when one event should notify several independent recipients, such as an email subscriber and an application.
Amazon SQS stores messages in a queue. Consumers poll the queue to receive work when they have capacity. Choose this model when the main need is to buffer work for processing, rather than push a notification to subscribers.
The distinction is who initiates delivery and who needs a copy, not simply whether the message is called an alert. An alert can be pushed to recipients through SNS or queued for a worker through SQS.
| Decision point | Amazon SNS | Amazon SQS |
|---|---|---|
| Messaging model | Topic and subscriptions | Queue and consumers |
| Delivery initiation | Service pushes | Consumer polls |
| Primary purpose | Distribute notifications | Buffer processing work |
| Multiple recipients | Independent subscriptions | Workers share work |
AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.