The confusion is understandable

Both SQS and SNS are AWS messaging services. Both let services talk to each other asynchronously. Both are fully managed. If you’re new to the AWS ecosystem, it’s natural to wonder why two services that look so similar exist side by side.

The difference is fundamental: SQS is a queue, SNS is a pub/sub system. They solve different problems, and conflating them leads to designs that are either over-engineered or broken in subtle ways. This post breaks down the distinction and gives you a clear mental model for picking the right tool.

Amazon SQS — the queue

Simple Queue Service (SQS) is a fully managed message queue. A producer puts messages into the queue; a consumer polls the queue and processes them one by one. Once a message is successfully processed, the consumer deletes it. If processing fails, the message becomes visible again after the visibility timeout expires, so another consumer can retry it.

PRODUCER Order Service send SQS QUEUE msg msg msg msg poll CONSUMER Payment Service Point-to-point: one consumer processes each message

SQS — pull-based, point-to-point queue

Key characteristics

One queue, one logical consumer

You can run multiple worker instances polling the same queue for horizontal scaling, but each message is processed by exactly one of them. SQS is fundamentally a work distribution mechanism, not a broadcast mechanism.

Amazon SNS — the pub/sub system

Simple Notification Service (SNS) is a fully managed pub/sub service. A publisher sends a message to a topic. SNS immediately fans that message out to all subscribers — simultaneously, in parallel. Subscribers can be SQS queues, Lambda functions, HTTP/HTTPS endpoints, email addresses, or SMS.

PUBLISHER Order Service publish SNS TOPIC order-events push-based LAMBDA Send confirmation email SQS QUEUE Payment processing SQS QUEUE Inventory update HTTP ENDPOINT Analytics webhook Fan-out: all subscribers receive every message simultaneously

SNS — push-based, fan-out to multiple subscribers

Key characteristics

Side-by-side comparison

Property SQS SNS
Delivery model Pull (consumers poll) Push (SNS delivers)
Consumers per message One All subscribers (fan-out)
Message persistence Up to 14 days Not persisted; delivery only
Delivery guarantee At-least-once At-least-once per subscriber
Ordering Standard or FIFO No ordering guarantee
Rate limiting / buffering Yes — queue absorbs spikes No — immediate fan-out
Message filtering Not built-in Per-subscription filter policies
Dead-letter queues Native DLQ support Supported for SQS/Lambda subscribers
Primary use case Work queue, task offloading Event broadcast, notifications

When to use SQS

Use SQS whenever you need to decouple a producer from a consumer and control the rate of processing. The queue acts as a buffer — it absorbs bursts of incoming work and lets your consumer scale independently.

Classic scenarios

# Sending a message to SQS (Python, boto3)
import boto3

sqs = boto3.client('sqs', region_name='us-east-1')

response = sqs.send_message(
    QueueUrl='https://sqs.us-east-1.amazonaws.com/123456789/order-processing',
    MessageBody='{"orderId": "abc-123", "total": 59.99}',
    MessageAttributes={
        'EventType': {
            'DataType': 'String',
            'StringValue': 'OrderPlaced'
        }
    }
)

When to use SNS

Use SNS whenever a single event needs to notify multiple independent systems simultaneously. The publisher does not know or care who the subscribers are. Adding a new subscriber does not require changing the publisher at all.

Classic scenarios

# Publishing to SNS (Python, boto3)
import boto3, json

sns = boto3.client('sns', region_name='us-east-1')

response = sns.publish(
    TopicArn='arn:aws:sns:us-east-1:123456789:order-events',
    Message=json.dumps({
        'orderId': 'abc-123',
        'customerId': 'usr-456',
        'total': 59.99
    }),
    Subject='OrderPlaced',
    MessageAttributes={
        'EventType': {
            'DataType': 'String',
            'StringValue': 'OrderPlaced'
        }
    }
)

The SNS + SQS fan-out pattern

In practice, the most powerful setup combines both services. SNS broadcasts the event; each subscriber gets its own SQS queue. This gives you the fan-out of SNS and the durability, retry logic, and rate control of SQS — for every consumer independently.

PUBLISHER Order Service SNS TOPIC order-events fan-out SQS QUEUE payment-queue CONSUMER Payment Service SQS QUEUE inventory-queue CONSUMER Inventory Service SQS QUEUE analytics-queue CONSUMER Analytics Service Each consumer has its own queue — independent durability and retry

SNS + SQS fan-out pattern — the best of both worlds

This pattern solves a real problem: if you only use SNS, a slow or temporarily unavailable subscriber will miss messages. If you only use SQS, you need multiple queues and separate producers for each consumer. The combined pattern lets a single publish flow reach multiple isolated, durable queues.

Why this pattern is used everywhere

With SNS + SQS fan-out, each consumer team owns their queue. They can set their own visibility timeout, retry policy, and DLQ. One consumer going down does not affect others. Scaling a single consumer is independent of the rest of the pipeline.

The decision framework

When you’re standing at the whiteboard trying to decide, run through these questions:

  1. Does exactly one system need to process each event? Use SQS.
  2. Do multiple independent systems need to react to the same event? Use SNS — or SNS + SQS if those consumers need durability.
  3. Does the consumer need to process messages at its own pace? Use SQS. The queue buffers the load.
  4. Is low-latency delivery to multiple endpoints more important than guaranteed processing? Use SNS directly.
  5. Do you need message ordering? Use SQS FIFO. SNS does not guarantee order.
  6. Can you tolerate message loss if a subscriber is down? If yes, SNS alone may suffice. If no, add SQS per subscriber.

Gotchas to watch out for

A few non-obvious behaviors that have caught people out in production:

Closing thoughts

SQS and SNS are complementary, not competing. SQS is a work queue: it buffers, persists, and distributes tasks to a single logical consumer. SNS is a broadcast bus: it fans events out to multiple subscribers simultaneously.

When in doubt, the SNS + SQS fan-out pattern is the safest default for event-driven architectures. It adds modest infrastructure complexity in exchange for durability, independent scaling, and clean decoupling — properties that pay off quickly as a system grows.

If you’re building a new service on AWS and reasoning through messaging patterns, feel free to reach out — happy to think through the design.