Overview

AWS Step Functions is a serverless workflow service that allows developers to define and execute multi-step application workflows. It offers a visual approach to orchestrating distributed applications, enabling the coordination of various AWS services, microservices, and legacy systems into resilient, auditable workflows. Users define state machines using the Amazon States Language, a JSON-based structured language, to specify the sequence of steps, decision logic, parallel execution paths, and error handling mechanisms.

The service is designed for scenarios requiring reliable coordination of tasks, such as long-running business processes, ETL (Extract, Transform, Load) operations, and complex serverless applications. Step Functions automatically manages the state of executions, including retries, error handling, and parallel branches, which removes the operational overhead typically associated with building and maintaining such logic. This allows developers to focus on the business logic of their applications rather than the underlying orchestration infrastructure.

AWS Step Functions offers two workflow types: Standard Workflows and Express Workflows. Standard Workflows are designed for long-running, durable, and auditable processes, capable of running for up to one year. They provide an execution history that can be inspected for debugging and auditing purposes. Express Workflows are optimized for high-volume, event-driven workloads, such as streaming data processing or real-time request-response patterns, with executions lasting up to five minutes. Express Workflows offer lower latency and higher throughput but do not retain an execution history by default, making them suitable for scenarios where a detailed audit trail is less critical.

The service integrates with over 200 AWS services directly, allowing developers to invoke Lambda functions, manage EC2 instances, interact with databases like DynamoDB, and send messages to SQS queues as part of a workflow step. This extensive integration capability makes Step Functions a central component in many AWS-based serverless and microservice architectures. Its ability to manage complex state transitions and provide built-in error handling and retry logic contributes to the resilience of distributed systems, a critical aspect of modern cloud-native development as discussed in articles on microservices architecture patterns.

Key features

  • Visual workflow designer: Create and visualize state machines using a drag-and-drop interface in the AWS Management Console, simplifying the design and understanding of complex workflows.
  • State management: Automatically track the state of each step in a workflow, including inputs, outputs, and execution status, eliminating the need for manual state tracking.
  • Error handling and retries: Built-in capabilities for defining retry policies and catch blocks to handle transient failures and unexpected errors gracefully, improving application resilience.
  • Parallel execution: Support for parallel branches and dynamic parallelism (via Distributed Map) to execute multiple tasks concurrently, accelerating overall workflow completion.
  • Long-running workflows: Standard Workflows can run for up to one year, suitable for human approvals, batch processing, and other durable processes.
  • High-throughput workflows: Express Workflows are optimized for high-volume, short-duration tasks, supporting millions of executions per second for real-time processing.
  • Integration with AWS services: Direct integration with over 200 AWS services, allowing workflows to invoke Lambda functions, manage databases, interact with messaging queues, and more, without writing custom integration code.
  • Workflow versioning: Manage different versions of state machines, allowing for safe deployments and rollbacks of workflow logic.
  • Data flow management: Control how data is passed between steps, enabling complex data transformations and filtering within the workflow definition.

Pricing

AWS Step Functions pricing is based on a pay-per-use model, primarily determined by the number of state transitions. There are different pricing structures for Standard Workflows and Express Workflows due to their distinct characteristics and use cases.

As of May 2026, the pricing details are as follows:

Workflow Type Metric Price (per unit) Free Tier (per month)
Standard Workflows State Transitions $0.025 per 1,000 transitions 3,500 transitions
Express Workflows State Transitions $0.000001 per transition 3,500,000 transitions
Express Workflows Duration & Memory $0.000000002 per GB-second Not applicable

For Standard Workflows, a state transition occurs each time a step in the workflow changes state (e.g., from running to succeeded, or from waiting to running). For Express Workflows, pricing is based on the number of transitions and the duration and memory consumed during execution. The free tier for Standard Workflows provides 3,500 state transitions per month. The free tier for Express Workflows provides 3,500,000 state transitions per month. These free tiers are sufficient for getting started and for many low-volume applications. Detailed and up-to-date pricing information is available on the AWS Step Functions pricing page.

Common integrations

AWS Step Functions integrates extensively with other AWS services, enabling the creation of complex, event-driven architectures. Key integrations include:

  • AWS Lambda: Invoke Lambda functions as steps within a workflow to execute serverless code for specific tasks. Refer to the Step Functions Lambda integration documentation.
  • Amazon SQS (Simple Queue Service): Send messages to SQS queues or wait for messages from queues, facilitating asynchronous communication between workflow steps.
  • Amazon SNS (Simple Notification Service): Publish messages to SNS topics to fan out notifications or trigger other services.
  • Amazon DynamoDB: Interact with DynamoDB tables to store or retrieve data as part of a workflow.
  • AWS Glue: Orchestrate ETL jobs defined in AWS Glue, managing dependencies and execution order.
  • Amazon S3 (Simple Storage Service): Perform operations on S3 buckets, such as uploading, downloading, or processing objects.
  • Amazon ECS (Elastic Container Service) / Amazon EKS (Elastic Kubernetes Service): Run containerized tasks as steps in a workflow, providing flexibility for custom processing logic.
  • Amazon EventBridge: Trigger Step Functions workflows based on events from various AWS services or custom applications.
  • AWS Batch: Submit and monitor batch jobs, coordinating complex computational workloads.
  • Amazon SageMaker: Orchestrate machine learning workflows, from data preparation to model deployment.

Alternatives

  • Azure Logic Apps: A cloud service for building automated workflows that integrate apps, data, services, and systems across enterprises or organizations.
  • Google Cloud Workflows: A fully managed orchestration platform that executes services in an order you define, combining serverless products and APIs into business processes.
  • Temporal: An open-source, durable execution system that enables developers to write complex, long-running business processes as code, with built-in retries, timeouts, and state management.
  • Azure Data Factory: Primarily an ETL service, it includes robust control flow capabilities that can orchestrate data movement and transformation workflows on Azure.
  • OpenStack Mistral: An open-source workflow service that helps users manage and execute workflows within an OpenStack environment, offering a declarative language for defining processes.

Getting started

To begin using AWS Step Functions, you define a state machine using the Amazon States Language (ASL), a JSON-based structure. This example demonstrates a simple "Hello World" workflow that passes an input string to a Lambda function and returns the result. First, ensure you have the AWS CLI configured and an IAM role with permissions for Step Functions and Lambda.

Step 1: Create a Lambda function

Create a Python Lambda function named MyHelloFunction that simply echoes its input. Save this as lambda_function.py:


import json

def lambda_handler(event, context):
    print(f"Received event: {event}")
    message = event.get('name', 'World')
    return {
        'statusCode': 200,
        'body': json.dumps(f'Hello, {message}!')
    }

Deploy this Lambda function (replace <YOUR_REGION> and <YOUR_ACCOUNT_ID> with your specific details):


zip function.zip lambda_function.py
aws lambda create-function \
    --function-name MyHelloFunction \
    --runtime python3.9 \
    --role arn:aws:iam::<YOUR_ACCOUNT_ID>:role/lambda-ex \
    --handler lambda_function.lambda_handler \
    --zip-file fileb://function.zip \
    --region <YOUR_REGION>

Ensure the IAM role lambda-ex has permissions to execute Lambda functions.

Step 2: Define the Step Functions state machine

Create a JSON file named hello_workflow.json for your state machine definition. This workflow has one state, InvokeLambda, which calls your MyHelloFunction.


{
  "Comment": "A simple Hello World workflow.",
  "StartAt": "InvokeLambda",
  "States": {
    "InvokeLambda": {
      "Type": "Task",
      "Resource": "arn:aws:states:::lambda:invoke",
      "Parameters": {
        "Payload.$": "$",
        "FunctionName": "arn:aws:lambda:<YOUR_REGION>:<YOUR_ACCOUNT_ID>:function:MyHelloFunction"
      },
      "OutputPath": "$.Payload.body",
      "End": true
    }
  }
}

Step 3: Create the Step Functions state machine

Create the state machine using the AWS CLI. You'll need an IAM role for Step Functions that has permissions to invoke Lambda functions. Replace <YOUR_ACCOUNT_ID>, <YOUR_REGION>, and <YOUR_STEP_FUNCTIONS_ROLE_ARN> with your values.


aws stepfunctions create-state-machine \
    --name "HelloWorldWorkflow" \
    --definition file://hello_workflow.json \
    --role-arn "<YOUR_STEP_FUNCTIONS_ROLE_ARN>" \
    --region <YOUR_REGION>

The <YOUR_STEP_FUNCTIONS_ROLE_ARN> should have a policy similar to this (adjust resource ARN):


{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "lambda:InvokeFunction"
            ],
            "Resource": "arn:aws:lambda:<YOUR_REGION>:<YOUR_ACCOUNT_ID>:function:MyHelloFunction"
        }
    ]
}

Step 4: Execute the workflow

Start an execution of your new state machine, providing an input that the Lambda function will use:


aws stepfunctions start-execution \
    --state-machine-arn "arn:aws:states:<YOUR_REGION>:<YOUR_ACCOUNT_ID>:stateMachine:HelloWorldWorkflow" \
    --input '{"name": "cloudpicker"}' \
    --region <YOUR_REGION>

The output will include an executionArn. You can then check the execution status and output:


aws stepfunctions describe-execution \
    --execution-arn "<YOUR_EXECUTION_ARN>" \
    --region <YOUR_REGION>

The output field in the response will show the result from your Lambda function, which should be "Hello, cloudpicker!". For more detailed instructions and advanced patterns, consult the AWS Step Functions documentation.