Module Objective: Redesign tightly coupled components of an architecture into a loosely coupled one using AWS application integration services.
Builds on Module 9: Decoupling is what makes the elasticity and high availability designed in Module 9 resilient to a single component's failure or slowdown.
Tight vs. Loose Coupling Revisited
Building on AWS Academy Cloud Foundations Module 9, this module identifies where the café architecture built so far is still tightly coupled — for example, a compute tier calling another service synchronously and waiting on its response — and redesigns those points using an intermediary.
Amazon SQS in Depth
Building on AWS Academy Cloud Foundations Module 9, Amazon SQS is applied here as the mechanism that lets a producer (such as an order-processing web tier) hand off work to a consumer (such as a fulfillment service) without either needing the other to be available at the same instant.
| SQS Feature | Architectural Benefit |
|---|---|
| Standard queue | At-least-once delivery, very high throughput, best-effort ordering |
| FIFO queue | Exactly-once processing and strict ordering, at lower throughput |
| Dead-letter queue | Captures messages that repeatedly fail processing, instead of losing or endlessly retrying them |
| Visibility timeout | Hides a message from other consumers while one consumer is processing it |
Amazon SNS in Depth
Amazon SNS is applied here for fan-out scenarios — for example, a single "order placed" event that needs to notify inventory, billing, and customer notification systems simultaneously, each as an independent subscriber.
Amazon EventBridge in Depth
Amazon EventBridge is applied here where the architecture needs more sophisticated event routing than a simple queue or topic — filtering and routing events by content, and integrating with both AWS services and external SaaS applications through a shared event bus.
Choosing an Integration Pattern
As with every other layer in this course, the specific integration service follows from the actual communication need between components.
| Need | Likely Fit |
|---|---|
| One producer, one consumer, work queued for later processing | Amazon SQS |
| One event, many independent subscribers | Amazon SNS |
| Complex, content-based event routing across services | Amazon EventBridge |
Key Terms for Module 12
- dead-letter queue
- An SQS queue that captures messages which repeatedly fail processing
- visibility timeout
- The period an SQS message is hidden from other consumers while one consumer processes it
- fan-out pattern
- Publishing one event to multiple independent subscribers, commonly via SNS to multiple SQS queues
- content-based routing
- Routing events based on their actual content, as supported by Amazon EventBridge rules
Review Questions
- What problem does a synchronous, tightly coupled call between two components create that a queue solves?
- What is the difference between a standard and a FIFO Amazon SQS queue?
- How does the SNS-to-multiple-SQS-queues fan-out pattern combine the strengths of both services?
- What capability does Amazon EventBridge add that Amazon SNS alone does not provide?