0Pricing
AWS Solutions Architect · Lesson

Choreography vs Orchestration Patterns

Contrast event choreography (each service reacts independently) with orchestration (a central coordinator directs services), and select the right pattern for your architecture.

Choreography vs Orchestration Patterns is a free AWS Solutions Architect lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the AWS Solutions Architect learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Two Approaches to Microservice Coordination

When microservices need to work together to complete a business process, there are two fundamental coordination patterns. Orchestration uses a central coordinator (like Step Functions) that explicitly commands each service. Choreography has no central coordinator — services listen for events and react independently. Understanding which to use, and when to combine them, is a key architectural skill tested on the SAA-C03 exam.

Orchestration Pattern Explained

In orchestration, a central service (the orchestrator) controls the sequence of operations. It calls Service A, waits for the response, then calls Service B, and so on. The orchestrator has full visibility into the process state, handles errors and retries, and can make decisions based on intermediate results. On AWS, Step Functions is the canonical orchestrator — it defines the entire workflow as a state machine and drives each step.

# Orchestration: Step Functions state machine drives order processing
# StepFunctions -> ValidateOrder Lambda -> ChargePayment Lambda -> NotifyShipping Lambda
# Each arrow is an explicit command from the orchestrator
# If ChargePayment fails, Step Functions catches the error and routes to NotifyFailure
# The orchestrator (Step Functions) knows the full state of the order at every moment

Choreography Pattern Explained

In choreography, services communicate through events without a central coordinator. Service A completes its task and publishes an event (e.g., OrderValidated) to an event bus or topic. Service B listens for OrderValidated events and processes payment, then publishes PaymentCharged. Service C listens for PaymentCharged and ships the order. Each service is autonomous and decoupled — it only knows about the events it consumes and produces, not the other services.

# Choreography: EventBridge bus connects services without central coordinator
# OrderService -> publishes 'OrderPlaced' to EventBridge
# PaymentService -> listens for 'OrderPlaced', charges card, publishes 'PaymentCharged'
# ShippingService -> listens for 'PaymentCharged', creates shipment, publishes 'OrderShipped'
# NotificationService -> listens for 'OrderShipped', sends email
# No service calls another service directly — all communication is via events

AWS Services for Each Pattern

On AWS, Step Functions is the primary orchestration tool. For choreography, the primary tools are Amazon EventBridge (for routing events between services with content-based filtering), Amazon SNS (for simple fan-out), and Amazon SQS (for point-to-point message passing between services). You can mix patterns: use EventBridge for cross-domain choreography between bounded contexts, and Step Functions for orchestrating steps within a single domain.

Trade-offs: Observability

Orchestration provides centralised visibility — the Step Functions execution history shows exactly where a workflow is, how long each step took, and what failed. Debugging is straightforward. Choreography distributes visibility across multiple services and event buses — tracing a single business transaction requires correlating logs and events across many services. This is why choreography systems rely heavily on correlation IDs and distributed tracing (AWS X-Ray) for end-to-end visibility.

# Correlation ID pattern for choreography observability
# Every event includes a correlationId that flows through the entire chain
{
  'source': 'com.myapp.orders',
  'detail-type': 'OrderPlaced',
  'detail': {
    'orderId': 'ORD-123',
    'correlationId': 'CORR-abc-456',  # propagated to every downstream event
    'customerId': 'CUST-789',
    'total': 99.99
  }
}

Trade-offs: Coupling

Choreography offers looser coupling — adding a new service that listens to existing events requires no changes to existing services. For example, adding an analytics service that listens for OrderPlaced events is zero-impact to the order or payment service. Orchestration introduces tighter coupling between the orchestrator and all the services it calls — adding a new step requires modifying the state machine definition, though the individual services remain isolated.

Trade-offs: Error Handling

Orchestration makes error handling explicit — Step Functions Catch blocks define fallback states for every error type, and the entire workflow history shows the failure context. In choreography, error handling is distributed — each service must handle its own failures and optionally publish a failure event that others can react to. Implementing sagas (compensating transactions to undo work when a step fails) is much more complex in choreography than in orchestration.

# Saga pattern in choreography: compensating events
# Happy path:
# OrderPlaced -> PaymentCharged -> InventoryReserved -> OrderShipped
#
# Failure path (InventoryReservation fails):
# InventoryReservationFailed event published
# PaymentService listens -> issues refund -> publishes PaymentRefunded
# OrderService listens -> cancels order -> publishes OrderCancelled
#
# In orchestration (Step Functions), the compensating logic is in explicit Catch states

When to Choose Orchestration

Prefer orchestration when: the business process has a clear linear or branching sequence with explicit success/failure outcomes; you need centralised visibility into process status for operations or compliance; error handling involves complex compensation logic; or the workflow is long-running and must survive service restarts. Examples: order fulfilment, patient onboarding, insurance claim processing — all workflows with clear start, end, and audit requirements.

When to Choose Choreography

Prefer choreography when: services are owned by different teams who should not be tightly coordinated; the system should be open to extension by new services without modifying existing ones; events represent facts rather than commands (e.g., 'OrderShipped' not 'ShipOrder'); or you want maximum scalability since there is no central bottleneck. Examples: analytics ingestion, notification fanout, audit logging — all cases where multiple independent consumers react to the same event.

Hybrid Architectures

Most real-world AWS architectures use both patterns at different levels of granularity. A common hybrid: use EventBridge choreography to decouple bounded contexts (e.g., Order domain emits events; Inventory, Payment, and Shipping domains each respond independently), while within the Payment domain, use Step Functions orchestration to coordinate the internal payment workflow steps (charge, fraud check, authorise, settle). This gives loose inter-domain coupling with internal process clarity.

# Hybrid: EventBridge for inter-domain + Step Functions for intra-domain
#
# EventBridge bus (choreography):
#   Order domain publishes 'OrderPlaced'
#   Payment domain receives it, starts Step Functions execution
#
# Step Functions (orchestration inside Payment domain):
#   ValidateCard -> FraudCheck -> AuthorisePayment -> SettlePayment
#   On success: PaymentDomain publishes 'PaymentCharged' to EventBridge bus
#   On failure: Step Functions Catch -> publishes 'PaymentFailed' event

SAA-C03 Exam Signals

On the exam, look for these signals. Choreography keywords: 'loosely coupled', 'services react to events', 'teams own independent services', 'fan-out to multiple consumers', 'add new service without changing existing ones'. Orchestration keywords: 'coordinate steps in sequence', 'track workflow state', 'handle partial failures with compensation', 'human approval step', 'long-running process with error handling'. A question describing a central coordinator directing other services is always orchestration.

Quick Check

Test your understanding of AWS Solutions Architect (SAA-C03) concepts from this lesson.

Lesson Recap

In this lesson you learned: orchestration uses a central coordinator (Step Functions) for explicit, visible workflow control, choreography uses events (EventBridge) for loose coupling and extensibility, and most production architectures combine both patterns at different levels of granularity. Next up we explore SAA-C03 exam format and domain weight strategy.

Frequently asked questions

Is the “Choreography vs Orchestration Patterns” lesson free?

Yes — the full text of “Choreography vs Orchestration Patterns” is free to read here on the web, and the AWS Solutions Architect course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the AWS Solutions Architect course, upgrade to CoddyKit PRO.

What will I learn in “Choreography vs Orchestration Patterns”?

Contrast event choreography (each service reacts independently) with orchestration (a central coordinator directs services), and select the right pattern for your architecture. You practise AWS Solutions Architect with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start AWS Solutions Architect?

No prior experience is required. AWS Solutions Architect on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Choreography vs Orchestration Patterns” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this AWS Solutions Architect lesson?

Yes. Every AWS Solutions Architect lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. EventBridge: Event Bus and Rules
  2. Step Functions: Orchestrating Serverless Workflows
  3. Kinesis Data Streams for Real-Time Event Processing
  4. Choreography vs Orchestration Patterns
← Back to AWS Solutions Architect