Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Amazon SNS to publish an event and push it to subscribers; use Amazon SQS to hold messages until consumers poll and process them. Subscribe one or more SQS queues to an SNS topic when each consumer needs its own independently buffered copy. Choose standard services when idempotent processing can tolerate occasional duplicates and best-effort ordering; use an SNS FIFO topic with SQS FIFO queues when ordering and deduplication are business requirements.

How SNS and SQS differ

Amazon SNS is a managed publish/subscribe service: a publisher sends a message to a topic, and SNS pushes it to subscribed endpoints. Amazon SQS is a managed message queue: consumers poll it, so producers and consumers can operate independently. AWS describes SNS as a “push” mechanism and SQS as a “polling model” for exchanging messages between distributed applications. AWS: What is Amazon SNS?

Service How messages move What it is for
Amazon SNS Publisher sends to a topic; SNS pushes to subscribers. Notify multiple endpoints of an event.
Amazon SQS Producer sends to a queue; consumers poll and handle messages. Buffer work for asynchronous processing.

Why combine SNS and SQS

Subscribing SQS queues to an SNS topic creates fanout. One publication can reach multiple queues, and each queue holds its own copy for its consumer. This separates the publisher from downstream services and isolates subscribers from one another: a slow consumer can work through its backlog without making other consumers share the same queue.

By default, an SNS-to-SQS notification includes the published subject and message along with the topic ARN, timestamp, and other SNS metadata. Raw message delivery changes this wrapper, so consumers should be built for the selected delivery format. AWS: Fanout to Amazon SQS queues

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Build an SNS-to-SQS fanout

  1. Create an SNS topic for the business event.
  2. Create a separate SQS queue for each consumer that needs independent scaling, ownership, latency, or retry behavior.
  3. Subscribe each queue to the topic. Add a queue policy that permits the SNS service to send messages, scoped to the intended topic ARN.
  4. Have each consumer poll its queue, process a message, and delete it only after successful handling.
  5. Attach an SNS subscription dead-letter queue for failed deliveries, and configure an SQS dead-letter queue for messages that consumers repeatedly fail to process.
  6. Monitor queue depth, message age, receive counts, and dead-letter queue growth in CloudWatch. Check IAM, queue policies, and KMS permissions in every account and Region involved.

Choose standard or FIFO

Choice Delivery and ordering Use it when
Standard SNS topic and SQS queue At-least-once delivery; duplicates can occur and ordering is best effort. Broad fanout and flexible asynchronous processing matter more than strict ordering. Consumers must be idempotent.
SNS FIFO topic and SQS FIFO queue FIFO delivery provides ordering and deduplication according to AWS FIFO semantics. Message order and deduplication are business requirements.

A FIFO topic can also have a standard queue subscription, but that queue does not inherit FIFO ordering or deduplication guarantees. Keep FIFO subscribers as FIFO queues when downstream processing depends on those guarantees. AWS: FIFO topic deduplication AWS: FIFO message ordering

Retries and dead-letter queues handle different failures

SNS delivery failures

SNS retries delivery according to the endpoint type and its retry policy. AWS documentation, accessed in 2026, specifies up to 100,015 attempts over 23 days for AWS-managed SQS and Lambda endpoints, and 50 attempts over six hours for several customer-managed endpoint types. These are endpoint-specific documented limits, not a universal schedule for every subscriber. AWS: SNS message delivery retries

If SNS exhausts its delivery retries, it discards the message unless the subscription has a dead-letter queue. The subscription DLQ is an ordinary SQS queue attached to that subscription. AWS requires the topic and DLQ to be in the same account and Region. For an encrypted DLQ, its KMS key policy must allow the SNS service principal to use the key. AWS: SNS dead-letter queues

SQS consumer failures

A queue DLQ addresses a different stage: delivery to the queue succeeded, but a consumer repeatedly failed to handle the message. Configure the source queue’s redrive policy so repeatedly received messages move to a separate SQS queue. Preserve the original payload and useful failure context for investigation or controlled replay; alert on DLQ depth and message age.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Retries, visibility timeouts, idempotent handling, the subscription DLQ, and the queue DLQ are complementary controls. Retries give a temporarily unavailable endpoint another chance; a visibility timeout prevents simultaneous processing of a received message for a configured period; idempotency limits the impact of duplicate processing; and the two DLQs capture failures at different handoff points.

Design for independent failure and recovery

Give each independently owned or differently scaled consumer its own queue. That keeps a slow or failing subscriber from blocking unrelated work. If one subscription is unavailable, other subscribers can continue, but messages for the failing subscription may be lost after retries if no subscription DLQ is configured.

For SQS consumers, delete a message only after successful processing. Set visibility timeout and redrive behavior to fit the work, and make handling safe to repeat because standard delivery can produce duplicates. For FIFO workflows, preserve the queue type and ordering assumptions end to end rather than relying on the topic alone.

Secure the message path

  • Use least-privilege IAM permissions and topic and queue resource policies; restrict queue sends to the intended SNS topic ARN.
  • For cross-account delivery, deliberately verify both the topic subscription permissions and the queue policy in the receiving account.
  • Use AWS KMS encryption when required and configure key policies and grants so authorized SNS and SQS operations can use the key. AWS states that SNS FIFO topics and SQS FIFO queues support KMS encryption; message bodies are encrypted, while message attributes, resource metadata, and metrics are not.
  • Use AWS PrivateLink VPC endpoints where a private network path to supported SNS or SQS APIs is required. AWS: SNS server-side encryption AWS: Amazon SQS security
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When archive and replay matter

AWS documents redundant storage across Availability Zones for SNS FIFO topics and SQS queues. FIFO topics can archive messages for up to 365 days and replay them to a subscription, supporting recovery or downstream state rebuilding. The 365-day maximum is the AWS-documented capability accessed in 2026; confirm current service configuration and constraints before designing around a retention period. AWS: FIFO topic archiving and replay

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check subscriber compatibility

SNS supports SQS, Lambda, HTTP/S, delivery streams, and Event Fork Pipelines as application-to-application subscribers. SNS FIFO topics cannot directly deliver to customer-managed endpoints such as email, SMS, mobile push, or HTTP/S because those endpoints do not guarantee strict ordering. AWS: SNS message delivery

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.