2.2 Event-Driven Architecture & Step Functions Orchestration
Design resilient event-driven systems using Amazon EventBridge content filtering, Dead-Letter Queues, and AWS Step Functions distributed Saga state machines.
🎯 Key AWS SAA-C03 Architectural Takeaways
- Amazon EventBridge rules evaluate JSON event patterns to filter and route events across AWS services and third-party SaaS applications.
- EventBridge targets support retry policies and Amazon SQS Dead-Letter Queues (DLQs) to capture events that fail target delivery.
- AWS Step Functions Standard Workflows coordinate long-running distributed microservices (up to 1 year) with visual state tracking and error handling.
- The Saga pattern in Step Functions uses Catch blocks to execute compensating rollback transactions when a multi-step distributed operation fails.
Event-driven architectures decouple producers and consumers through asynchronous event buses. Amazon EventBridge serves as a central event router that ingests events from AWS services, custom application code, and integrated SaaS partners. EventBridge rules match incoming JSON structures using declarative content-based filtering (such as string matching, numeric thresholds, or prefix checks), dispatching only relevant events to targets.
To ensure resilience against transient failures, EventBridge targets support configurable retry policies and Dead-Letter Queues (DLQs). If a target Lambda function or API destination experiences throttling or crashes, EventBridge retries with exponential backoff and eventually routes the failed event payload to an SQS DLQ with full error context.
When business workflows span multiple microservices requiring sequential execution, branching, and state management, AWS Step Functions replaces complex application glue code. Step Functions Standard Workflows manage state transitions durably for up to one year, providing visual auditability and built-in retry/catch mechanisms.
In distributed e-commerce transactions, the Saga pattern ensures data consistency without two-phase commit locks. If an order processing workflow reserves hotel and flight bookings but fails credit card authorization, Step Functions catches the error and executes compensating rollback tasks that release the previously held reservations.
⚠️ Common Pearson VUE / AWS Exam Traps
- Filtering events in Lambda code rather than EventBridge rule patterns — declarative EventBridge filtering saves compute invocations and execution cost.
- Using Express Workflows for workflows exceeding 5 minutes — Express Workflows max out at 5 minutes; Standard Workflows support durations up to 1 year.
- Holding Lambda functions open with sleep timers to coordinate workflows instead of using Step Functions state transitions.
An airline booking application requires a distributed transaction coordinator to execute four microservices in sequence: reserve flight, reserve hotel, charge credit card, and send confirmation email. If the credit card charge fails, the system must execute compensatory rollbacks to release the hotel and flight reservations. The transaction workflow can take several minutes. Which AWS service is best suited to manage this workflow?