A JSON state machine for logic that a few lines of JavaScript express better. I've never needed it.
Don't use it when
- Almost always. Plain code in Lambda (or Lambda durable functions) does the job with less ceremony.
Pricing
Standard workflows: $25 per million state transitions. 1M four-step runs a month ≈ $110.
Provisioning
Official Pulumi package · Official Terraform provider
Use instead
Plain code. SQS for simple async work; Lambda durable functions for multi-step jobs.
Alternatives
- Lambda durable functions You need per-step retries.
- Amazon SQS Simple async work.
Where it fits
- Background jobs and retries: Don't.
A JSON state machine for logic that a few lines of JavaScript express better, and one more thing to deploy and debug. SQS with retries covers simple async work; Lambda durable functions are the candidate for multi-step jobs.
Instead: Amazon SQS or Lambda durable functions
- Event-driven plumbing: Don't.
A JSON state machine where a queue and a few lines of JavaScript do the job.
Instead: Amazon SQS or Lambda durable functions
Last reviewed by Nicolas Dao