Search code examples
amazon-web-servicesaws-step-functionsaws-cost-explorer

Using AWS step function with a wait state


I have a requirement where a client submits a job which I would like to execute after 1 hour. For this I am planning to follow the below design:

  1. Create a AWS Step function (Standard workflow) with 2 state transitions. First is a Wait state which will simply wait for 1 hour and then the second state invokes a lambda function which emits an event to an AWS event bridge.
  2. Once the event is emitted to event bridge further processing performed.

In this design, my question is whether I will be charged for the 1 hour wait time I have in the Wait state. Is my understanding that this is not charged and only 2 state transitions per workflow execution is charged?


Solution

  • Correct. Standard Workflows are priced only on the number of "State transitions".


    Pricing is different for Standard and Express workflows. Use the AWS Pricing Calculator to compare costs for your use case:

    Standard Workflows

    • State transitions: A state transition is counted each time a step in your execution is completed.

    Express Workflows

    • Duration: Duration is calculated from the time your workflow begins executing until it completes or otherwise terminates, rounded up to the nearest 100 milliseconds.
    • Memory: Memory consumption is based on the size of a workflow definition, the use of map or parallel states, and the execution (payload) data size.