You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
AWS offers multiple services for event-driven communication, and choosing the right one — or the right combination — is one of the most important architectural decisions you will make. Each service solves a different problem, and production systems often use several of them together. In this lesson, we provide a comprehensive decision framework.
| Service | Pattern | Core Purpose |
|---|---|---|
| Amazon SQS | Point-to-point queue | Decouple producer from consumer with a buffer |
| Amazon SNS | Publish-subscribe | Broadcast one message to many subscribers |
| Amazon EventBridge | Event bus with routing | Intelligent content-based routing with native AWS integration |
| AWS Step Functions | Workflow orchestration | Coordinate multi-step processes with state management |
| Dimension | SQS | SNS |
|---|---|---|
| Delivery | Consumer pulls from queue | SNS pushes to subscribers |
| Consumers | One consumer processes each message | All subscribers receive every message |
| Persistence | Messages stored up to 14 days | No persistence — push and forget |
| Retry | Built-in via visibility timeout | Depends on subscriber type |
| Ordering | FIFO available | FIFO available |
| Best for | Work queues, buffering, load levelling | Notifications, fan-out, alerts |
Choose SQS when: You need to decouple a producer from a single consumer, buffer messages during traffic spikes, or ensure reliable processing with retries and DLQs.
Choose SNS when: You need to notify multiple systems of the same event simultaneously, send alerts to humans (email, SMS), or fan out messages to multiple SQS queues.
| Dimension | SNS | EventBridge |
|---|---|---|
| Routing | Filter policies on attributes | Content-based rules on event body |
| Sources | Your applications | AWS services + SaaS + your applications |
| Throughput | Nearly unlimited | Soft limit (can be increased) |
| Archive | Not available | Built-in archive and replay |
| Schema | No schema support | Schema registry with code generation |
| Targets | SQS, Lambda, HTTP, Email, SMS | 20+ target types |
| Cost | $0.50/million publishes | $1.00/million custom events |
| Best for | High-throughput pub/sub | Complex routing, AWS service events |
Choose SNS when: You need massive throughput, simple fan-out, or human notifications (email, SMS).
Choose EventBridge when: You need content-based routing on the event body, want to react to AWS service events, need event archiving and replay, or want schema discovery.
| Dimension | SQS | Step Functions |
|---|---|---|
| Coordination | None — consumer decides what to do | Central coordinator manages the workflow |
| State | Stateless — each message is independent | Stateful — tracks workflow progress |
| Error handling | DLQs and manual retry logic | Built-in retry and catch with backoff |
| Visibility | Monitor queue metrics | Visual workflow with execution history |
| Duration | Messages retained up to 14 days | Workflows up to 1 year |
| Best for | Independent tasks | Sequential, branching, or complex workflows |
Choose SQS when: Each message can be processed independently without knowing the outcome of other messages.
Choose Step Functions when: You need to coordinate multiple steps, make decisions based on intermediate results, or handle errors across a multi-step process.
Ask yourself these questions to choose the right service:
One consumer → SQS
Multiple consumers → SNS or EventBridge
Yes, strict ordering → SQS FIFO or SNS FIFO → SQS FIFO
No ordering needed → Standard SQS, SNS, or EventBridge
Simple attribute filtering → SNS filter policies
Complex body-based routing → EventBridge rules
No filtering needed → SQS or SNS
Yes → EventBridge (default bus receives AWS events automatically)
No → SQS, SNS, or EventBridge custom bus
Sequential steps with error handling → Step Functions
Independent message processing → SQS
Yes → EventBridge (archive and replay)
No → Any service
In practice, these services are rarely used in isolation. Here are the most common combinations:
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.