Amazon Simple Notification Service (AWS SNS)
Amazon Simple Notification Service (AWS SNS) is a fully managed, highly scalable pub/sub messaging service from AWS. It enables applications to send messages (notifications) instantly to multiple recipients or systems in a decoupled way.
It supports both:
- Application-to-Application (A2A) messaging → fan-out messages to other services/systems
- Application-to-Person (A2P) messaging → direct notifications to end users
Core Concept: Topics + Publish/Subscribe Model
- You create a topic (a logical communication channel).
- Publishers send messages to that topic (one publish → many deliveries).
- Subscribers register interest in the topic by subscribing their endpoints.
- When a message is published, SNS automatically pushes (fan-out) copies to all valid subscribers.
This pattern is ideal for decoupling producers from consumers.
Supported Subscription Protocols / Endpoint Types
- Amazon SQS queues (very common pairing)
- AWS Lambda functions
- HTTP/HTTPS endpoints (webhooks)
- Email (plain or with JSON format)
- SMS text messages
- Mobile push notifications (Apple APNs, Google FCM, Amazon ADM)
- Platform applications (for mobile push)
Two Types of Topics (2025–2026 era)
| Feature | Standard Topics | FIFO Topics |
|---|---|---|
| Ordering | Best-effort (usually preserved) | Strictly first-in-first-out |
| Exactly-once delivery | At-least-once (possible duplicates) | Exactly-once (with deduplication) |
| Throughput | Virtually unlimited | Lower (but still high – ~300 msg/s) |
| Use case | Most applications, alerts, fan-out | Order-sensitive workflows, transactions |
| Message group ID | Not required | Required for ordering & deduplication |
Key Features
- Message filtering (subscribers can set filter policies to receive only relevant messages)
- Message archiving & replay (replay messages from the last 1–7 days)
- Server-side encryption (at rest with AWS KMS)
- Delivery status logging (to CloudWatch Logs)
- Dead-letter queues support
- Message attributes (key-value metadata)
- Large message payloads → use SNS Extended Client Library + S3 (up to ~2 GB)
- Message data protection (scanning for sensitive data patterns)
Common Use Cases
- Real-time alerts & monitoring (CloudWatch alarms → SNS → email/SMS/Slack/Lambda)
- Fan-out in microservices / event-driven architectures
- Mobile & web push notifications
- SMS/email marketing / transactional messages
- Triggering serverless workflows (SNS → Lambda)
- Cross-account / cross-region notifications
- IoT device notifications
Pricing (Pay-as-you-go, no upfront fees)
AWS offers a generous free tier:
- 1 million publish requests / month
- 1 million mobile push notifications / month
- 1,000 email notifications / month
- 100 SMS messages / month (account-level)
Beyond free tier (very approximate US pricing in 2025–2026):
- Publishes → ~$0.50 per million requests (each 64 KB chunk = 1 request)
- Deliveries:
- HTTP/S → ~$0.60 per million
- Lambda → often free (billed via Lambda)
- SQS → often free (billed via SQS)
- Email → ~$2.00 per 100,000
- SMS → varies significantly by country (~$0.006–$0.045 per message)
- Mobile push → ~$0.50 per million
FIFO topics are slightly more expensive than Standard.
SNS vs Similar AWS Services (Quick Comparison)
| Service | Best for | Delivery style | Ordering guarantee | Typical pairing |
|---|---|---|---|---|
| SNS | Fan-out, notifications, push | Push (immediate) | Best-effort / FIFO | SNS → Lambda / SQS |
| SQS | Message queue, decoupling, buffering | Pull | Best-effort / FIFO | SNS → SQS (fan-out queue) |
| EventBridge | Event bus, SaaS integrations, schema | Push + advanced routing | Varies | Complex event routing |
In short: SNS is the “push fan-out” service — great whenever you want to broadcast one message to many destinations quickly.
If you’re just starting, the AWS console makes creating a topic and subscribing an email or Lambda function very straightforward — you can test it end-to-end in under 5 minutes.