The mental model

A business workflow may need to reserve inventory, charge a customer, and send a confirmation. Step Functions models transitions and coordinates tasks, with workflow-type-specific execution guarantees and limits. A visible state machine helps explain what has completed, what may retry, and what requires recovery after a partial failure.

Orchestration does not make external side effects exactly once. A payment task can succeed while its response is lost, so a retry needs an idempotency strategy at the payment boundary. Set bounded retries with appropriate backoff, distinguish transient from permanent errors, and define compensation when completed work cannot simply be rolled back.

Decisions to make

  1. Use orchestration when state transitions and operational recovery deserve an explicit model.
  2. Design idempotency and compensation at each side-effecting task boundary.

Design exercise · no AWS resources needed

Work through a scenario

Inventory is reserved successfully, but payment fails permanently.

  1. Draw the workflow states and the retryable error paths.
  2. Specify a compensation step for the reservation.
  3. Identify a case that requires a human review instead of another automatic retry.

Check your understanding

Does a state machine remove the need for idempotent payment requests?

Continue with AWS documentation

Before following a deployment guide, review current pricing, permissions, and cleanup steps. Budget alerts are not a hard spending cap.

Saved in this browser. Press again to undo.

Prepaid · USD

Top up balance

Available balance: $0.00

Your balance works across Heap tools. A failed lookup or generation releases its reserved amount.