What's changed: In-scope coverage: added auto scaling (EC2 Auto Scaling), app integration (MQ/Step Functions/AppSync/AppFlow), migration/transfer (Application Migration Service/DMS/DataSync/Transfer Family/Snow Family), and hybrid connectivity (Direct Connect/Site-to-Site VPN/Client VPN/Transit Gateway/PrivateLink) across sections
2.2Decoupling and Messaging
Understand decoupling components with Amazon SQS (queues) and Amazon SNS (publish/subscribe) to absorb spikes and improve scalability.
Directly connecting components lets one failure or overload cascade. Decoupling with SQS or SNS improves resilience and scalability.
2.2.1SQS and SNS
- Amazon SQS: a message queue separating producers/consumers, buffering work to absorb spikes (pull-based, typically one-to-one); consumers process at their own pace.
- Amazon SNS: publish/subscribe, fanning out one message to many subscribers (push-based, one-to-many).
- Fan-out (SNS + SQS): multiple SQS queues subscribe to one SNS topic—deliver at once and buffer each consumer independently.
- EventBridge: event-driven integration, routing events from many AWS services/SaaS via rules.
Tightly coupled components (calling each other directly) cascade failures and overload and are hard to scale. Decoupling inserts a queue or topic so components run independently. SQS "queues work and processes in order"—smoothing load spikes; messages persist even if a consumer goes down. SNS "delivers one message to many at once"—good for broadcasting notifications/events. Combining them as fan-out (SNS topic → multiple SQS queues) is a common SAA pattern. The deciding axis: "buffer and process = SQS / notify many = SNS."
| Aspect | Amazon SQS | Amazon SNS |
|---|---|---|
| Model | Queue (1:1) | Pub/sub (1:many) |
| Delivery | Pull (consumer fetches) | Push (to subscribers) |
| Main use | Buffer/smooth work | Notifications/fan-out |
Scenario: decoupled order processing. To absorb order peaks, enqueue orders in SQS; worker fleet (Auto Scaling) consumes at its own pace. Publish the "order placed" event to an SNS topic and fan out to separate SQS queues for inventory, billing, and email—processed in parallel. A delay/failure in one does not stop the whole.
Watch the mix-ups: (1) SQS = queue (pull, 1:1, buffer) / SNS = pub/sub (push, 1:many, fan-out). (2) Decoupling limits cascading failures and enables independent scaling. (3) SQS retains messages, so it tolerates consumer failures. (4) General event-driven routing = EventBridge.
Q. SQS or SNS? Buffer and process in order = SQS; broadcast one message to many = SNS. Combine via fan-out (SNS → multiple SQS). Q. Benefits of decoupling? Prevent cascading failures, scale independently, absorb spikes. Q. EventBridge vs SNS? EventBridge is an event bus routing events from many sources via rules; SNS focuses on fan-out to subscribers.
A common SAA distinction: buffer work/absorb spikes = SQS (queue, pull, 1:1) vs one-to-many notifications/fan-out = SNS (pub/sub, push); SNS + SQS = fan-out. Decoupling is key to scalable, resilient design.
2.2.2Other key in-scope services (application integration)
Beyond SQS/SNS/EventBridge, there are services for decoupling and workflows. Amazon MQ is a managed message broker compatible with Apache ActiveMQ/RabbitMQ—choose it to migrate apps that use standard protocols like JMS/AMQP (for new cloud-native designs, SQS/SNS are the default). AWS Step Functions orchestrates multiple service calls as a state machine with sequencing, branching, and retries—choose it to reliably chain multi-step processing. AWS AppSync is a managed GraphQL API—use it to combine multiple data sources behind one API. Amazon AppFlow is no-code data integration between SaaS (e.g., Salesforce) and AWS—choose it for scheduled data sync.
| What you want | Service |
|---|---|
| Standard-protocol message broker | Amazon MQ |
| Multi-step workflow orchestration | AWS Step Functions |
| Managed GraphQL API | AWS AppSync |
| No-code SaaS-AWS integration | Amazon AppFlow |
2.2.3Section summary
- Decouple with SQS (queue, pull, buffer) / SNS (pub/sub, push, fan-out)
- Fan-out (SNS → multiple SQS) for simultaneous delivery + independent processing; decoupling boosts scalability and resilience
Sign in to track progress — Log in.
Quick check
(just a quick review)Q1. Which AWS service decouples producers/consumers and buffers work to absorb spikes?
Q2. Which service fans out one message to many subscribers at once?
Q3. What is a main benefit of decoupling components?

