Decision guide
Temporal vs Step Functions vs Queue + State Machine
What should run your long-running business workflows?
Side by side
| Criterion | Temporal | AWS Step Functions | Queue + state machine (DIY) |
|---|---|---|---|
| Authoring | Code (Go/Java/TS/Python/.NET) | ASL JSON/YAML + visual editor | Your code + DB |
| Timers / long waits | Durable sleep (any length) | Wait states (≤ 1 year standard) | Cron/scheduled jobs |
| Retries & compensation | Policies + code | Retry/Catch per state | Hand-rolled |
| Visibility | Event history per workflow | Execution history + console | Whatever you build |
| Hosting | Self-host or Temporal Cloud | Managed | Existing infra |
| Cost driver | Infra / actions | State transitions | Engineering time |
When to choose each
Temporal
Durable execution: workflows as code with deterministic replay.
Choose when
- Complex, long-running processes in code
- Multi-cloud or self-hosted needs
Avoid when
- Teams unwilling to learn determinism constraints
AWS Step Functions
Managed state machines (JSON/YAML) with service integrations.
Choose when
- AWS-native orchestration
- Visual workflows with built-in retries
Avoid when
- Very complex logic (giant state machines)
- Non-AWS environments
Queue + state machine (DIY)
Status columns + queued jobs + cron sweepers.
Choose when
- Few simple workflows
- Avoiding new infrastructure
Avoid when
- Many long-running workflows with timers and compensations
Verdict
For a handful of simple flows, a DIY state machine is fine. As flows multiply or need timers and compensations, adopt Temporal (code-first, portable) or Step Functions (AWS-native, managed).