SQS, SNS, and EventBridge all decouple AWS components by passing messages between them. This page compares them by number of receivers and how routing is decided, then covers each service.
Choosing a service
Three AWS services move messages between components. Pick by how many receivers there are and how routing is decided.
| SQS | SNS | EventBridge | |
|---|---|---|---|
| Shape | Queue, consumers pull | Topic, pushed to subscribers | Bus, rules route by event content |
| Max size | 1 MiB | 256 KB | 256 KB |
| Keeps messages | 60 seconds to 14 days | No; DLQs for failed deliveries | Archive up to 14 days for replay |
| Delivery | At least once; FIFO exactly-once1 | At least once2 | Retry policy per target3 |
Combining them
SNS plus SQS fanout is the SNS note’s recommended pattern for reliable asynchronous processing: each subscriber gets its own buffered queue. All three recommend DLQs and idempotent consumers.123
Amazon SQS
SQS is a managed message queue for decoupling distributed systems; messages are stored redundantly.1
Concepts
- Standard queues deliver at least once with high throughput; FIFO queues give ordered, exactly-once processing per message group.
- Visibility timeout hides a received message while it is processed; set it above the maximum processing time.
- Retention defaults to 4 days, configurable from 60 seconds to 14 days.
- Dead-letter queues catch messages that keep failing, via
maxReceiveCount. - Long polling (
ReceiveMessageWaitTimeSeconds=20) and batches of up to 10 messages cut cost.1
Troubleshooting and limits
| Symptom | Check |
|---|---|
| Messages stuck | Visibility timeout versus processing time, consumer errors |
| Duplicates | Expected on standard queues; idempotent consumers |
| DLQ filling | Fix the consumer, then redrive |
| FIFO order broken | Same message group ID per workflow |
As tabled in the note. Messages are 1 KB to 1 MiB; up to 120,000 in-flight messages per standard queue.1 See AWS messaging choices.
Amazon SNS
SNS is managed pub/sub: publishers send to a topic, which delivers to every subscribed endpoint (SQS, Lambda, HTTP(S), email, mobile push, SMS, Data Firehose).2
Concepts and practices
- Fanout: one publish reaches many endpoints; SNS plus SQS gives buffered, reliable processing.
- Filter policies on subscriptions so each receives only relevant messages.
- DLQs on subscriptions; SSE-KMS; payloads up to 256 KB.
- Delivery is at least once, so consumers must be idempotent.2
Troubleshooting
| Symptom | Check |
|---|---|
| Not delivered to SQS | Subscription, SQS queue policy allows SNS, DLQ |
| Email/HTTP inactive | Confirm the subscription |
| Filtered messages missing | Filter policy versus message attributes |
| SMS not sending | SMS sandbox, spending limits, Region |
As tabled in the note.2 See AWS messaging choices.
Amazon EventBridge
EventBridge ingests, filters, transforms, and delivers events between AWS services, your applications, and SaaS. It includes event buses with rules, Pipes for point-to-point integrations, and Scheduler for cron, rate, and one-time schedules.3
Concepts
- Events are JSON state changes; AWS services emit them automatically to each account’s default bus.
- Rules match events by pattern (source, detail-type, detail fields) and route to targets such as Lambda, SQS, SNS, and Step Functions, optionally transforming input.
- Archives keep events up to 14 days for replay.
- Pipes connect one source (including DynamoDB streams or Kinesis) to one target with filtering and enrichment.
- Events are up to 256 KB.3
Practices
- Versioned
detail-typeand stablesource; custom buses per domain; Pipes instead of Lambda glue. - Test replay before relying on it; alarm on target delivery failures.3
Troubleshooting
| Symptom | Check |
|---|---|
| Rule doesn’t fire | Pattern matches source and detail-type; bus and Region |
| Target not invoked | Target ARN, permissions, transformation syntax |
| Replay not delivering | Archive contents, destination rule active |
As tabled in the note.3 See AWS messaging choices.
Related
- Application integration: APIs, workflows, and message brokers.
- Streaming and search: Kinesis and MSK for ordered, replayable streams.
- Domain index: other pages in this domain.