AWS Step Functions Pricing

AWS Step Functions Standard Workflows pricing details

You are charged based on the number of state transitions required to execute your application.

Step Functions counts a state transition each time a step of your workflow is executed. You are charged for the total number of state transitions across all your state machines, including retries.

The Step Functions free tier includes 4,000 free state transitions per month. All charges are metered daily and billed monthly.

Free Tier

4,000 state transitions
per month

The Step Functions Free Tier is available to both existing and new AWS customers indefinitely.

 

State Transitions

With AWS Step Functions, you pay for the number state transitions you use per month. You are charged per state transition. above the free tier. See the State Transitions Pricing Table for details.

If you include retry error handling in any steps of your workflow, each retry will be charged as an additional state transition.

AWS Step Functions Standard Workflow State transitions pricing

AWS Step Functions Express Workflows pricing details

With Step Functions Express Workflows, you pay only for what you use. You are charged based on the number of requests for your workflow and its duration.

Step Functions Express Workflows counts a request each time it starts executing a workflow, and you are charged for the total number of requests across all your workflows. This includes tests from the console.

Duration is calculated from the time your workflow begins executing until it completes or otherwise terminates, rounded up to the nearest 100ms, and the amount of memory used in the execution of your workflow, billed in 64-MB chunks.

Memory consumption is based on the size of a workflow definition, the use of map or parallel states, and the execution (payload) data size. Pricing examples 3 and 4 show examples of estimating memory utilization. 

Additional charges

You may incur additional charges if the operation of your application workflow utilizes other AWS services or transfers data. For example, if your application workflow invokes an AWS Lambda function, you will be billed for each request and for the duration of each Lambda function. To invoke endpoints in private networks, such as in Amazon Virtual Private Clouds (VPC), Step Functions integrates with AWS PrivateLink and Amazon VPC Lattice. For invocations to private endpoints using AWS PrivateLink and Amazon VPC Lattice, you will be billed at standard AWS PrivateLink and Amazon VPC Lattice charges for data transfer. For details on AWS service pricing, see the pricing section of the relevant AWS service detail pages. Links to pricing for some of the commonly used services follow.

Data transfer

External data transfers to and from Amazon EC2

AWS Lambda pricing

Requests and duration

Amazon EC2 pricing

On-Demand, Reserved, and Spot Instances

Amazon ECS pricing

Fargate and EC2 Launch Types

Step Functions pricing examples

  • sfn_sm_upload_delete_raw

    An application workflow has four state transitions, determined by counting the nodes on the graph:

    1. Start
    2. Upload RAW File
    3. Delete RAW File
    4. End 

    The price per state transition in EU (Germany) is €0.0000246714 and the Free Tier provides 4,000 state transitions per month. If you executed this state machine 100,000 times during one month, without any retries dues to errors, you would pay:

    State transitions in workflow * executions of workflow = total billable state transitions

    4 * 100,000 = 400,000

    Total state transitions – Free Tier state transitions = billable state transitions

    400,000 – 4,000 = 396,000

    Approximate monthly charges = 396,000 * €0.0000246714 = €9.77

  • sfn_sm_image_processing

    The state machine used in this example may be found on GitHub.

    An application workflow with branching conditions has more than one path. In this example, there are 10 arrows (or arcs) connecting steps. The happy path from "Start" to "End" flows through nine state transitions determined by counting the nodes on the graph. Paths that flow from "Start" to the "NotSupportedImageType" will accumulate three or four state transitions. Additional state transitions may be charged if retry error handling is included in any state.

    The price per state transition in EU (Germany) is €0.0000246714 and the Free Tier provides 4,000 state transitions per month. If you executed this application workflow 100,000 times during one month, the happy path succeeds every time, and there are no retries due to errors, you would pay:

    State transitions per execution * executions of workflow = total billable state transitions

    9 * 100,000 = 900,000

    Total state transitions – Free Tier state transitions = billable state transitions

    900,000 – 4,000 = 896,000

    Approximate monthly charges = 896,000 * €0.0000246714 = €22.10

  • You can estimate an AWS Step Functions Express Workflow’s memory utilization from the size of the state machine definition, the execution (payload) data size, and the use of Map or Parallel states.

    Workflow memory utilized = 50 MB + state machine definition size + execution data size x Number of Parallel or Map Steps

    Example:

    If you have a workflow with a 10 KB state machine definition size, and no parallel or map steps:

    Workflow memory utilized = 50 MB + 10 KB
    Workflow memory utilized = 50.01 MB
    Billed memory (in 64 MB chunks) = 64 MB

    CloudWatch Metrics contains details on memory consumption under ExpressExecutionMemory and billed memory under ExpressExecutionBilledMemory. You can view metrics such as Executions Started, Execution Duration, Billed Duration and Billed Memory for each workflow in the AWS Step Functions Console under Step Functions > State Machines > State Machine Name in the Monitoring tab.

    If you run 1 million workflows each month, and the average duration of the workflows is 30 seconds:

    Monthly request charges

    The price is €0.0000009869 per request.
    Approximate monthly request charges = 1M requests x €0.0000009869 = €0.99

    Monthly duration charges

    The price is €0.0000164509 per GB-second of duration for the first 1000 hours GB-hours.
    1 million workflows x 30 seconds of duration = 30,000,000 seconds
    30,000,000 x 64 MB (billed memory) /1024 MB = 1,875,000 GB-s
    Approximate monthly duration charges = 1,875,000 GB-s x €0.0000164509 = €30.84

    Total monthly charges

    Total monthly charges = request charges + duration charges
    Approximate total monthly charges = €0.99 + €30.84 = €31.84

  • You can estimate an AWS Step Functions Express Workflow’s memory utilization from the size of the state machine definition, the execution (payload) data size, and the use of Map or Parallel states.

    Workflow memory utilized = 50 MB + state machine definition size + execution data size x Number of Parallel or Map Steps

    If you have a workflow with a 50 KB state machine definition size, 400 map steps with 32 KB of payload per step:

    Workflow memory utilized = 50 MB + 50 KB + (32 KB x 400 steps)
    Workflow memory utilized = 50 MB + 50 KB + 12,800 KB
    Workflow memory utilized = 62.85 MB
    Billed memory (in 64 MB chunks) = 64 MB

    CloudWatch Metrics contains details on memory consumption under ExpressExecutionMemory and billed memory under ExpressExecutionBilledMemory. You can view metrics such as Executions Started, Execution Duration, Billed Duration and Billed Memory for each workflow in the AWS Step Functions Console under Step Functions > State Machines > State Machine Name in the Monitoring tab.

    If you run 100 million workflows each month, and the average duration of the workflows is 10 seconds:

    Monthly request charges

    The price is €0.0000009869 per request.
    Monthly request charges = 100M requests x €0.0000009869 = €98.69

    Monthly duration charges

    100 million workflows x 10 seconds of duration = 1,000,000,000 seconds
    1,000,000,000 x 64 MB (billed memory) /1024 MB = 62,500,000 GB-s
    62,500,000 GB-s / 60 / 60 = 17,361.11 GB-hours
    €0.05922 per GB-hour x 1,000 GB-Hours = €59.22
    €0.02959 per GB-hour x 4,000 GB-Hours = €118.36
    €0.01620 per GB-hour x 12,361.11 GB-Hours = €200.25

    Approximate monthly duration charges = €59.22 + €118.36 + €200.25 = €377.83

    Total monthly charges

    Total monthly charges = request charges + duration charges
    Total monthly charges = €98.69 + €377.83 = €476.52

  • The Map State can be used to iterate over and process large datasets. This example includes pre and post processing steps, and iterates over 1 M objects from an Amazon Simple Storage Service (S3) bucket.

    The Map state has two modes: Inline and Distributed. This example uses Map state in Distributed mode to achieve high concurrency and Distributed Map costs one state transition per iteration. Also, with the Distributed Map state, you can specify the execution type for the data processing workflow. In this example, the Express execution type is used. The Express workflow within the Distributed Map uses less than 64 MB memory and the average duration of an execution is 30 seconds.

    One execution from this workflow includes 1,000,005 state transtions, 1,000,000 Express requests, and 520.33 GB-hour duration:

    • 1 Start execution state transition
    • 1 Enter Pre-processing state transition
    • 1 Enter Map state transition
    • 1,000,000 Start Map iterations state transition
      • Note: there is no state transition for starting each iteration when you use an Inline Map. See documentation on when to use Map in Inline mode or Distributed mode.
      • Note: with the Distributed Map state, you can reduce the number of iterations by batching your workload. See documentation on optimization by batching.
    • 1,000,000 Express requests
    • 520.83 GB-hours Express duration
      • 1 million iterations x 30 seconds of duration = 30,000,000 seconds
      • 30,000,000 seconds x 64 MB (billed memory)/1024 MB = 1,875,000 GB-s
      • 1,875,000 GB-s / 60 / 60 = 520.83 GB-hours
    • 1 Enter Post-processing state transition
    • 1 End execution state transition

    State Transitions charges

    The price per state transition in the EU (Germany) is €0.0000246714. The Free Tier provides 4,000 free state transitions per month.

    Total state transitions - Free Tier state transitions = billable state transitions

    1,000,005 - 4000 = 996,005

    State Transition charges = 996,005 * €0.0000246714 = €24.57

    Express Request charges
    The price per million requests in the EU (Germany) is €0.0000009869
    Request charges = 1 M requests x €0.0000009869 = €0.9869

    Express Duration charges
    The price for the first 1,000 GB-hour in the EU (Germany) is €0.05922.

    Duration charges = 520.83 GB-hour x €0.05922 = €30.84

    Total Charges

    Total charges = €24.57 + €0.9869 + €30.84 = €56.40