Amazon Simple Notification Service
Notifications (pub/sub)
Sends one message to many receivers at once (fan-out): SQS, Lambda, email, SMS, HTTP.
- Cost$ Low
- Difficulty●●●●●
- Costs money when idle?No
- Serverless
- In examsCLF · SAA · DVA · SOA
Think of it asLike a loudspeaker: say it once, and everyone who subscribed hears it.
Where does SNS fit?
SNS calls
A real example, step by step
- When a new order arrives, three systems need to know: the warehouse, accounting and the customer-email service.
- The ordering service publishes one message to the SNS topic “new-order”.
- Three SQS queues subscribe to the topic; each gets a copy and the system behind it works at its own pace.
- Adding a new system, such as analytics, just means another subscription — the ordering service doesn't change.
- Meanwhile, CloudWatch alarms publish to another topic that texts the on-call engineer when something breaks.
▶ Watch the “Event-driven image processing” scenario on the map
When to use it
✓ Use it when
Fanning out an event, sending alerts via email/SMS.
✗ Avoid it when
You need complex event filtering/routing → EventBridge; you need to store messages to process gradually → SQS.
Common uses
- Fan out one event to multiple SQS queues or Lambda functions
- Operational alerts via email/SMS
- Push notifications for mobile apps
SNS, SQS or EventBridge?
| Type | Pub/sub to many subscribers | Queue waiting to be processed | Rule-based event routing |
|---|---|---|---|
| Delivers to | SQS, Lambda, HTTP, email, SMS, push | Whoever polls | 20+ AWS target types, APIs |
| Filtering | By message attributes | None | Rules on event content |
| Best for | Fan-out, notifying people | Decoupling, absorbing load | Events from AWS services/SaaS |
What does it cost?
- Pricing model: ~$0.50/1 million publishes; delivery to SQS and Lambda is free; email, HTTP, SMS billed separately (SMS by country).
- Free tier: Always Free: 1 million publishes, 1,000 emails, 100,000 HTTP deliveries per month.
SMS is fairly expensive and vulnerable to 'SMS pumping' attacks; forgetting filter policies so every subscriber gets every message.
One event must reach several systems that each work independently → SNS fan-out to multiple SQS queues. SMS/email when a CloudWatch alarm fires → SNS. Ordering matters → a FIFO topic with FIFO queues.
Try real exam questions
1[...] is a fast, flexible, fully managed push messaging service.
- AAmazon SNS.
- BAmazon SES.
- CAmazon SQS.
- DAmazon FPS.
Show answer
Correct answer: A
SNS is a fully managed push messaging (pub/sub) service. SES sends email; SQS is a queue.
2A user is running a webserver on EC2. The user wants to receive the SMS when the EC2 instance utilization is above the threshold limit. Which AWS services should the user configure in this case?
- AAWS CloudWatch + AWS SQS.
- BAWS CloudWatch + AWS SNS.
- CAWS CloudWatch + AWS SES.
- DAWS EC2 + AWS Cloudwatch.
Show answer
Correct answer: B
A CloudWatch alarm watches the EC2 CPU and publishes to an SNS topic with an SMS subscription. SQS is a queue and can't send SMS; SES is an email service.
Frequently asked questions
What is fan-out with SNS and SQS?
One SNS topic sends the same message to several SQS queues, and each queue is processed by its own system at its own pace. This lets you add new consumers without changing the publisher.
How is SNS priced?
By publish requests and by deliveries to each type of endpoint; delivery to SQS or Lambda is very cheap, while SMS and email have their own prices, and SMS prices vary by country.
What do AWS exams ask about SNS?
The SNS + SQS fan-out pattern, sending CloudWatch alarms by email, message filtering by attributes, FIFO topics when order matters, and telling it apart from SQS and EventBridge.