PlayCloudLabs
Sign in
  1. Learn
  2. AWS
  3. Application integration
  4. SNS
AWSGCP laterAzure later

SNSAmazon Simple Notification Service

Application integrationCore service · full depthFree while we build the libraryChecked against AWS docs · 15 Sept 2026

Publish once to a topic, and SNS pushes a copy to every subscriber: SQS queues, Lambda functions, HTTPS endpoints, email, SMS and mobile apps.

Where SNS takes you5 steps, all open

  1. I know the problem it solves
  2. I can picture it
  3. I know when to choose it
  4. I can use it in a design
  5. I can answer an exam question

What & why

One message, many receivers

Amazon SNS delivers messages from publishers to subscribers. A publisher sends a message to a topic, and SNS pushes a copy to every subscription: to applications through SQS queues, Lambda functions, HTTPS endpoints and Data Firehose, or to people through email, SMS and mobile push.

Fan-out. Publish an order once, and a fulfilment queue, an analytics queue and a receipts function each get their own copy to work on in parallel. A filter policy lets a subscriber receive only the messages it cares about.

Reach for it when

  • one event must reach several systems at once
  • alarms must reach people by email or SMS
  • each consumer should get only some of the messages
  • ordered, deduplicated fan-out into SQS FIFO queues is needed

It is the wrong tool when

  • a single consumer should pull work at its own pace: that is an SQS queue
  • a message is bigger than 256 KiB: keep it in S3 and publish a pointer

Mental model

A news wire

A news wire. A reporter files a story once, and the wire pushes it at the same moment to every newspaper that subscribed, each getting its own copy. Some papers take only the sport. A paper whose line is down gets the story again and again until it comes through, or it goes into a tray to be dealt with later.

The wirethe channel publishers send toTopic
Filing a storysending a message oncePublish
A paper's subscriptionan endpoint that gets its own copySubscription
Taking only the sportreceiving only matching messagesFilter policy
Sending again until it arrivesretries after server-side errorsDelivery policy
The tray for laterwhere undeliverable messages waitDead-letter queue

How it works

Topic, subscribe, filter, publish
  1. Create a topicStandard for most uses, or FIFO when order and deduplication matter.
  2. Subscribe endpointsSQS queues, Lambda functions, HTTPS endpoints, Data Firehose, email, SMS or mobile push.
  3. Add filter policiesA subscription with no filter policy gets every message; one with a policy gets only the messages that match.
  4. PublishSNS pushes the message to every matching subscription, and retries when an endpoint returns a server-side error.
Message size
256 KiBup to 2 GB with the Extended Client Library
Subscriptions
12,500,000per standard topic; 100 per FIFO topic
Filter policies
200 per topic10,000 per account
Retries to SQS, Lambda
23 days100,015 attempts
Retries to email, SMS, push
6 hours50 attempts
FIFO archive
Up to 365 daysfor subscribers to replay
  1. Publish

    Is the message at most 256 KiB? Larger payloads go through the Extended Client Library, which keeps them in S3.

  2. Filter policy

    Does this subscription's filter policy match the message's attributes or body? With no filter policy, every message matches.

  3. Delivery

    Can the endpoint take it? Server-side errors are retried; client-side errors, such as a deleted endpoint, are not.

Pick a case to follow the message through each check.

Architecture

One order, three jobs

Architecture

The checkout publishes each order once; fulfilment, analytics and receipts each get their own copy, and failed deliveries to the receipts function wait in a dead-letter queue.

The checkout publishes each order once; fulfilment, analytics and receipts each get their own copy, and failed deliveries to the receipts function wait in a dead-letter queue.

One publish, three jobs. The checkout publishes once; fulfilment, analytics and receipts each get their own copy, and none waits for another.

Queues set their own pace. With SQS queues subscribed, each consumer reads at its own speed, and messages wait in the queue if the consumer is down.

Filtering at the topic. The analytics subscription's filter policy passes only large orders, so its queue never sees the rest.

A dead-letter queue per subscription. Messages the receipts subscription cannot deliver land in an SQS queue in the same account and Region, instead of being discarded.

Security

Encrypted topics and their subscribers

Encryption at rest with KMS. Server-side encryption protects message bodies with the AWS managed key for SNS or a customer managed key. It does not cover topic metadata, message attributes or metrics.

HTTPS on encrypted topics. Every request to a topic with server-side encryption must use HTTPS and Signature Version 4.

Encrypted queues as subscribers, or as dead-letter queues, need a customer managed KMS key whose key policy lets the SNS service principal use it.

Private publishing. SNS supports message privacy through VPC endpoints with AWS PrivateLink.

Cost

How you are charged, not what it costs today

Standard topics are charged per million API requests, each 64 KB of published data counting as one request, plus deliveries priced by endpoint type.

Deliveries to SQS and Lambda carry no per-message delivery charge; data transfer still applies.

FIFO topics are charged per published and delivered message, plus the payload data.

Extras: filtering on message bodies, archiving and replay, data protection, and SMS priced by destination country.

Prices change, so none are printed here. Check the SNS pricing page on aws.amazon.com.

Comparison

Push or pull, standard or FIFO
ServiceDeliversConsumersChoose it when
SNSPushes each message to every subscriberMany, each with its own copyOne event, many reactions
SQSHolds each message until a consumer takes itConsumers that pollWork pulled at the consumer's own pace
Topic typeSubscribersThroughputChoose it when
StandardSQS, Lambda, HTTPS, Firehose, email, SMS, mobile pushUp to 30,000 messages a second per account in us-east-1Most fan-out and notifications
FIFOSQS FIFO and standard queues only300 messages a second per message group, 3,000 per topic by defaultOrder and deduplication matter
EndpointsRetry policyAttempts
SQS, LambdaSet by AWS100,015, over 23 days
SMTP, SMS, mobile pushSet by AWS50, over 6 hours
HTTP/SYour own, within 3,600 seconds in totalSet per topic or subscription

SAA traps

The phrase in the question, and what it means
send the same message to several SQS queues at onceSNS fan-out

Each subscribed queue gets its own copy.

each consumer should receive only some kinds of messageSubscription filter policies

Matched on message attributes or the body; without one, a subscriber gets everything.

strict order and no duplicates, fanned out to queuesAn SNS FIFO topic with SQS FIFO queues

A deduplication ID repeated within 5 minutes is accepted but not delivered again.

a FIFO topic delivering straight to Lambda or emailNot possible

FIFO topics deliver only to SQS queues; put a queue in front of the function.

undeliverable messages must not be lostA dead-letter queue on the subscription

Without one, SNS discards a message once its retries end.

publish a 5 MB payloadS3 with the Extended Client Library

Messages stop at 256 KiB.

the queue wants the plain message, without SNS's JSON around itRaw message delivery

Supported for SQS, Firehose and HTTP/S subscriptions.

encrypt messages at rest in the topicServer-side encryption with KMS

It encrypts message bodies, not metadata or attributes.

a consumer must pull work when it is readySQS, not SNS

SNS pushes each message to its subscribers as soon as it is published.

replay last week's orders to a new subscriberArchiving and replay on a FIFO topic

A FIFO topic can keep messages for up to 365 days for subscribers to replay.

Scenario

Exam style, marked when you answer

An online store's checkout service must tell three systems about every order: fulfilment, analytics and a fraud check. Each works at its own pace, a slow or failed system must neither hold up the others nor lose orders, and the fraud system wants only orders above a set value. What should a solutions architect design?

Practice

Fill the gap, the way the challenges work

A checkout function must announce each order once, so that a fulfilment queue and several other subscribers each have their own copy pushed to them at the same moment. What does the function publish to?

Lambda· Checkout functionPick a service belowSQS· Fulfilment queue

Quick revision

The night before the exam
What
Pub/sub: publish to a topic, and every subscriber gets a copy.
Subscribers
SQS, Lambda, HTTPS, Firehose, email, SMS, mobile push.
Filter
A filter policy per subscription; none means everything.
FIFO
Ordered and deduplicated; delivers to SQS queues only.
Retries
SQS and Lambda for 23 days; email, SMS and push for 6 hours.
DLQ
An SQS queue on the subscription, or the message is discarded.
Size
256 KiB; more through S3 with the Extended Client Library.
Fan-out
One topic to many SQS queues: parallel, each at its own pace.

This whole page is free right now.The AWS library is still being written, so every page of it is open to everyone while that lasts. It becomes a paid bundle later; what you read today costs you nothing.

Checked against

Every fact on this page was checked against AWS’s own documentation on 15 Sept 2026. If AWS has changed something since, its page is the one to trust.

Still there?

You have been away for a while. We have saved what you were working on in this browser. In 60 seconds you will be signed out to keep your account safe.