AWS SNS vs SQS vs EventBridge β When to Use Which?
SNS, SQS, and EventBridge all move messages around AWS, but they solve different problems. Here's a clear explanation of each with real use cases and the decision criteria that actually matters.
Three AWS messaging services, and they're constantly confused with each other. SNS, SQS, and EventBridge all move messages β but they're built for different problems.
The One-Line Difference
SNS (Simple Notification Service) β Push messages to multiple subscribers at once. Fan-out.
SQS (Simple Queue Service) β Store messages in a queue. Workers pull and process them. Decoupling.
EventBridge β Route events based on rules. Event bus for AWS services and custom apps.
SQS β The Decoupling Queue
SQS is a queue. Messages sit in it until a consumer polls and processes them.
Producer β [Queue] β Consumer
Key characteristics:
- Consumer pulls messages (not pushed)
- Messages processed once (by one consumer)
- Messages stored up to 14 days
- Scales automatically
- Dead-letter queue (DLQ) for failed processing
- Visibility timeout prevents double-processing
When to use SQS:
- Background job processing (resize image, send email, process payment)
- Decoupling a slow consumer from a fast producer
- Rate limiting β queue absorbs bursts, consumer processes at its own pace
- Retry logic β failed messages go to DLQ for inspection
# Producer (Lambda, EC2, ECS)
import boto3
sqs = boto3.client('sqs')
sqs.send_message(
QueueUrl='https://sqs.ap-south-1.amazonaws.com/123456789/orders',
MessageBody=json.dumps({
'order_id': '12345',
'action': 'process_payment'
})
)
# Consumer (worker Lambda or EC2)
response = sqs.receive_message(
QueueUrl=queue_url,
MaxNumberOfMessages=10,
WaitTimeSeconds=20 # Long polling
)
# Process message, then delete it
sqs.delete_message(QueueUrl=queue_url, ReceiptHandle=msg['ReceiptHandle'])SQS types:
- Standard Queue β At-least-once delivery, best-effort ordering
- FIFO Queue β Exactly-once processing, strict ordering (but lower throughput)
SNS β Fan-Out Notifications
SNS is a topic. When you publish to it, all subscribers receive a copy.
Producer β [Topic] β Subscriber 1 (Lambda)
β Subscriber 2 (SQS Queue)
β Subscriber 3 (Email)
β Subscriber 4 (HTTP endpoint)
Key characteristics:
- Push-based β SNS pushes to subscribers
- All subscribers get a copy of every message
- No storage β if subscriber is unavailable, message is lost (unless subscriber is SQS)
- Supports: Lambda, SQS, HTTP/S, Email, SMS, Mobile push
When to use SNS:
- Notifying multiple systems about the same event
- Triggering parallel processing of the same message
- Email/SMS alerts to humans
sns = boto3.client('sns')
sns.publish(
TopicArn='arn:aws:sns:ap-south-1:123456789:order-events',
Message=json.dumps({'order_id': '12345', 'status': 'placed'}),
Subject='New Order Placed'
)SNS + SQS Fan-Out Pattern
The most common real-world pattern: SNS publishes, multiple SQS queues subscribe.
New Order Event
β (SNS Topic)
βββ SQS: Payment Service Queue
βββ SQS: Inventory Service Queue
βββ SQS: Notification Service Queue
βββ Lambda: Analytics (immediate)
This gives you fan-out (all services notified) with durability (SQS stores messages if a service is down).
EventBridge β Event Routing
EventBridge is an event bus with rules. Events are matched against rules, and matching events are sent to targets.
AWS Service events βββ
Custom app events βββ [Event Bus] ββrule-matchβββ Target
SaaS partner events βββ
Key characteristics:
- Filters events based on content (not just topic)
- Routes to many targets: Lambda, SQS, SNS, ECS tasks, Step Functions, API Gateway, etc.
- Built-in schema registry
- Receives events from 200+ AWS services natively
- Scheduled events (cron-like) via EventBridge Scheduler
When to use EventBridge:
- Reacting to AWS service events (S3 upload, EC2 state change, RDS events)
- Complex event routing with content-based filtering
- Connecting SaaS tools (Salesforce, Zendesk, GitHub) to AWS
- Replacing CloudWatch Events (EventBridge is the successor)
- Event-driven microservices with rich filtering
// EventBridge rule β only trigger for EC2 instances stopping
{
"source": ["aws.ec2"],
"detail-type": ["EC2 Instance State-change Notification"],
"detail": {
"state": ["stopped", "terminated"]
}
}events = boto3.client('events')
# Put custom event
events.put_events(
Entries=[{
'Source': 'myapp.orders',
'DetailType': 'Order Placed',
'Detail': json.dumps({'order_id': '12345', 'amount': 599}),
'EventBusName': 'default'
}]
)Side-by-Side Comparison
| SQS | SNS | EventBridge | |
|---|---|---|---|
| Model | Queue (pull) | Pub/Sub (push) | Event routing |
| Message storage | Up to 14 days | No (except if SQS subscriber) | No |
| Ordering | FIFO option | No | No |
| Content filtering | No | Message attributes only | Rich JSON filtering |
| AWS native events | No | No | Yes (200+ services) |
| Retry logic | Built-in DLQ | Retry policy | Retry + DLQ |
| Throughput | High | High | Lower than SQS/SNS |
| Cost | Very low | Very low | Slightly higher |
Decision Guide
Use SQS when:
- You need to decouple a producer from a slow consumer
- You want exactly-once or at-least-once processing
- Background jobs, async processing
- You need the queue to buffer bursts
Use SNS when:
- One event needs to reach multiple destinations
- You need fan-out pattern
- Alerting humans (email/SMS)
- No complex filtering needed
Use EventBridge when:
- You want to react to AWS service events
- You need content-based routing rules
- You're building event-driven microservices
- You're connecting SaaS tools to AWS
- You need scheduled tasks (cron)
The most common production pattern:
EC2 state change / S3 upload / etc.
β EventBridge (captures AWS events, filters)
β SNS Topic (fan-out to multiple teams)
β SQS Queues (per-service, reliable processing)
β Lambda Workers (actual processing)
For hands-on AWS messaging labs and SAA-C03 exam prep, KodeKloud covers SNS, SQS, and EventBridge with real scenarios.
Stay ahead of the curve
Get the latest DevOps, Kubernetes, AWS, and AI/ML guides delivered straight to your inbox. No spam β just practical engineering content.
Related Articles
AWS CloudWatch: The Complete Monitoring Guide for DevOps Engineers (2026)
AWS CloudWatch is the central monitoring service for everything running on AWS. This guide covers metrics, logs, alarms, dashboards, Container Insights, and production best practices.
AWS DevOps Tools β CodePipeline to EKS Complete Overview
A complete guide to AWS DevOps services β CI/CD pipelines, container orchestration, infrastructure as code, monitoring, and security best practices.
AWS EKS vs Google GKE vs Azure AKS β Which Managed Kubernetes to Use in 2026?
Honest comparison of EKS, GKE, and AKS in 2026: pricing, developer experience, networking, autoscaling, and which one to pick for your use case.