Recognising Microservice, Event-Driven, Orchestration and Saga Patterns
This lesson explains the common architectural patterns that the exam expects you to recognise, and the AWS services used to build them. Designing complete architectures is outside the exam's scope.
Learning outcomes
After completing this lesson, you will be able to:
- Distinguish monolithic and microservice architectures.
- Describe event-driven architecture and the AWS services that carry events.
- Distinguish choreography from orchestration.
- Explain how the saga pattern uses compensating actions to undo completed steps.
Monoliths and microservices
A monolith is an application built and deployed as one unit. It is simple to develop, test and deploy at first, because all code shares one process and one database. As it grows, every change requires redeploying the whole application, a fault in one part can affect all of it, and the busiest part cannot be scaled without scaling everything.
Microservices divide the application into small services, each responsible for one business capability, such as orders or payments, and each owning its own data. Services communicate through APIs or events, and each can be deployed, scaled and changed by its own team. On AWS they are typically built with Lambda or containers behind API Gateway or a load balancer. The cost is distributed complexity: network calls can fail, data is spread across services, and monitoring needs tracing across service boundaries.
The strangler fig pattern migrates a monolith gradually. A routing layer, such as API Gateway or an Application Load Balancer, sends specific paths, such as /payments, to a new service while all other paths still reach the monolith. Paths move one at a time until the old system can be retired, which avoids a risky all-at-once rewrite. The following table summarises the three patterns.
| Pattern | Description |
|---|---|
| Monolith | Deployed as one unit; simple at first, but every change needs a full redeployment and parts cannot scale separately |
| Microservices | Small services deployed independently, each owning its data; often Lambda or containers behind API Gateway or a load balancer |
| Strangler fig | Migrate gradually by routing specific paths, through API Gateway or an ALB, to new services until the old system can be retired |
Recognise the pattern
Event-driven architecture
Components publish events that others react to, using EventBridge, SNS, SQS, Kinesis or DynamoDB Streams. Fan-out sends one event to many consumers, typically from SNS to several SQS queues.
Choreography vs orchestration
When a business process spans several services, something must decide what happens in what order. There are two approaches.
In choreography, no service is in charge. Each service publishes events about what it has done, such as OrderPlaced, and other services react to the events they care about, usually through EventBridge rules. Services stay loosely coupled, and a new consumer can be added without changing the others. However, the overall process exists only as the sum of many rules, so it is hard to see where an order is stuck, and handling failures that require earlier steps to be undone is complicated.
In orchestration, a coordinator, typically a Step Functions state machine, calls each service in turn and decides the next step from the result. The process is defined in one place, every execution can be inspected, and retries, timeouts and compensating steps are declared in the workflow. The coordinator is coupled to the services it calls. Many systems combine the two, using orchestration within a service and choreography between services. The following table summarises the differences.
The following diagram contrasts the two ways of coordinating the same order process.

Choreography or orchestration?
The saga pattern
Distributed services cannot share one database transaction. A business transaction that spans several, such as booking a flight, a hotel and a car, uses a saga: each step has a compensating action, and if a later step fails, Step Functions runs the compensations in reverse order to undo the completed steps.
The following diagram shows a saga undoing a partly completed booking.

Choreography or orchestration?
An order process has five steps: reserve stock, charge the card, create the shipment, send the confirmation and update loyalty points. The team compares two designs:
Payment and stock need careful compensation (a saga), so the team orchestrates those steps with Step Functions, and lets loyalty points and analytics react to an OrderCompleted event, where loose choreography suits.
In a saga, what happens when a later step of a distributed transaction fails?
Show answer
Compensating actions undo the steps that already succeeded, for example refunding a payment after a failed shipment, because the services share no database transaction that could be rolled back.
Exam Tips
Remember for the exam
- A central workflow with retries and visibility is orchestration with Step Functions.
- Independent services reacting to events is choreography with EventBridge.
- One event with many independent consumers points to SNS-to-SQS fan-out.
- To undo completed steps when a later step fails, use the saga pattern with compensating actions.
- To migrate a monolith gradually, use the strangler fig pattern.