DEV Community

Cover image for Express or Standard? Picking the Right Step Functions Workflow Type
Sascha Mirow-Stanitzok
Sascha Mirow-Stanitzok

Posted on Originally published at sascha-ms.de

Express or Standard? Picking the Right Step Functions Workflow Type

A while ago I looked at a state machine that answered a simple API call in well under a second. It had been running for months, two million times a month, and nobody had questioned the workflow type. It was Standard, because Standard is what you get when you click through the console without thinking. That one default decision turned a two-digit monthly bill into a three-digit one.

AWS Step Functions offers two workflow types, Standard and Express. They look almost the same, but they are billed in completely different ways – and you cannot switch the type of an existing state machine. In my full article on Step Functions Express vs Standard I work through the numbers for a fictional bike rental shop and build both variants with the Serverless Framework. Here is the condensed reasoning.

Two pricing models that reward opposite things

Standard charges per state transition. Time is free: a Wait state that pauses for three days costs the same as one that pauses for three seconds. That makes Standard a great fit for anything that waits, polls or involves people.

Express charges per execution plus duration multiplied by memory (rounded up to 100 ms and to 64 MB chunks). Most workflows land at 64 MB. Here, the number of steps does not matter much – but every second counts.

From the US East prices you can derive a handy rule of thumb: at 64 MB, one Standard transition costs about as much as 24 seconds of Express duration. Divide the average runtime of your workflow by its number of transitions. Clearly below 24 seconds? Express is cheaper. Above? Standard wins.

What the numbers look like in practice

In the article, the bike rental shop "Radhof" has three candidate workflows:

  • A booking quote behind the website: two Lambda steps, about 300 ms, two million runs per month. Standard comes to roughly $199.90, Express to about $2.63 – a factor of around 76.
  • A photo check on return that polls an image analysis for about four minutes, 50,000 times a month. That is 48 seconds per transition, so Standard ($6.15) beats Express ($12.55).
  • A return reminder that waits days for the return date. Express is not even an option, because it stops after five minutes.

To make this repeatable, the full article includes a small TypeScript module that models the tiered Express pricing, the rounding rules and the free Standard transitions. The core idea fits into a few lines:

// Seconds of Express duration (first tier, 64 MB) that cost
// as much as one Standard transition
const standardPerTransition = 0.000025;
const expressPerGbSecond = 0.06 / 3600;
const memoryGb = 64 / 1024;

const breakEven = standardPerTransition / (expressPerGbSecond * memoryGb);
console.log(breakEven.toFixed(1)); // ~24.0
Enter fullscreen mode Exit fullscreen mode

Price is not the most important difference

What surprised me most when I dug into this: the cost question is often the smaller one. Express comes with trade-offs that matter more:

  1. Execution guarantee. Asynchronously started Express workflows run at least once, so every step should be idempotent. Calculating a price is fine; charging a credit card twice is not.
  2. No built-in history. Express executions only show up in CloudWatch Logs – and when you deploy via CloudFormation, CDK or the Serverless Framework, logging is off by default. Without a LoggingConfiguration you are flying blind.
  3. Missing integration patterns. .sync and callbacks with .waitForTaskToken are not available in Express.
  4. The five-minute limit. A polling workflow that is "usually" fast will be aborted the day the external service is slow.

My personal rule: everything that answers within seconds behind an API and is idempotent becomes Express. Everything involving waiting, people or money becomes Standard. And often the best answer is both – a Standard parent that calls cheap Express child workflows for the many small steps.

At low volumes, by the way, I would not optimize for cents at all. At a few thousand executions a month both types are practically free, and the Standard execution history in the console is very hard to beat for debugging.

What the full article covers

  • The complete pricing breakdown for both types, including tiers, free allowance and how retries are counted
  • The full TypeScript cost calculator plus a script that compares your own workloads
  • A step-by-step Serverless Framework project with an Express and a Standard state machine using JSONata
  • Common pitfalls such as missing logging, duplicate executions and the 60-second console timeout
  • How to combine Standard and Express, plus an FAQ

Read it here: Step Functions Express vs Standard: Costs Compared

📖 This is the condensed version. The full article on sascha-ms.de goes deeper – with all code samples, diagrams and a short knowledge check.


👉 Next step: Working with AWS CDK? Grab my printable AWS CDK cheat sheet with commands, concepts and a stack skeleton.

📬 Stay updated: New articles on serverless, AI and leading tech teams via RSS, browser push or the weekly newsletter (in German).

Originally published on sascha-ms.de. More articles on serverless, AI in everyday development and leading tech teams: sascha-ms.de/en

Top comments (0)