ladderlore
  • Type a service name, like S3 or IAM.

Service · Application Integration

AWS Step Functions

Coordinates several AWS services as one visual workflow, with steps, decisions, retries and waits.

A new order
Step Functions
LambdaDynamoDBSNS
  1. 1A new order starts a run of the workflow.
  2. 2Step Functions runs a Lambda function to charge the card. If the call fails, it tries again.
  3. 3It saves the order in a DynamoDB table.
  4. 4It publishes a message to SNS, which tells the customer that the order is confirmed.
A Step Functions workflow takes an order through three services, one step after another.

Step by step

  1. 1A new order starts a run of the workflow.
  2. 2Step Functions runs a Lambda function to charge the card. If the call fails, it tries again.
  3. 3It saves the order in a DynamoDB table.
  4. 4It publishes a message to SNS, which tells the customer that the order is confirmed.
  • Steps in order

    Each step starts when the one before it ends, and receives its result.

  • Decisions

    Take a different path depending on the data, such as an order above a set amount.

  • Retries

    Retry a step that failed, or catch the error and run another step.

  • Parallel steps

    Run several steps at once, or the same steps for every item in a list.

  • Wait for a person

    Pause until someone approves, then carry on.

  • Visual history

    See each run as a diagram, with the input and result of every step.

What a workflow can do without extra code.

1 / 2

  • Steps in order

    Each step starts when the one before it ends, and receives its result.

  • Decisions

    Take a different path depending on the data, such as an order above a set amount.

  • Retries

    Retry a step that failed, or catch the error and run another step.

  • Parallel steps

    Run several steps at once, or the same steps for every item in a list.

2 / 2

  • Wait for a person

    Pause until someone approves, then carry on.

  • Visual history

    See each run as a diagram, with the input and result of every step.

What a workflow can do without extra code.

What it is

AWS Step Functions is a serverless service for building workflows. A workflow, also called a state machine, is a series of steps. Each step does one piece of work, often by calling another AWS service such as AWS Lambda, Amazon DynamoDB or Amazon SNS. Coordinating services in this way is called orchestration.

Step Functions keeps track of where each run of the workflow is. It passes data from one step to the next, takes different paths depending on the data, retries steps that fail and can pause until a person approves. Because this logic lives in the workflow, the code in each step stays small.

What it is

You design a workflow in a visual editor and can watch every run as a diagram. Standard workflows suit long-running processes, such as an order that waits for approval. Express workflows suit very large numbers of short tasks, such as processing streaming data.

Remember

  • Orchestration: one workflow controls the order in which services do their work.
  • Built-in error handling: retry a failed step, or run a different step instead.
  • Workflows can branch, run steps in parallel and wait for a human approval.
  • It calls many AWS services directly, with little or no code.

Remember

  • Serverless: no servers to manage, and it scales with the number of runs.

On the exam

  • “Coordinate several Lambda functions into a workflow” or “orchestrate microservices visually” points to AWS Step Functions.
  • “A multi-step business process with retries, decisions or a manual approval step” points to Step Functions.