Step Functions

Step Functions leverage state machines and allow to go beyond some of the Lambda Functions limitations:

  • They can run for up to 1 year (Vs 15 minutes for Lambda)

  • They are stateful, while Lambda Functions environments cannot guarantee a state and have to be considered stateless.

They have a start point and an end point, in between there are states. States can do things, they can decide things and they all take in data, modify data and output data. So states are the things inside these workflows.

The state machine is designed to perform a flow which consists of lots of individual components and maintain the idea of data between those states.

There are two types of workflows available:

  • Standard: the default, with 1 year of execution time limit.

  • Express: designed for high volume event processing workloads such as IoT, streaming data processing and transformation, mobile application backends, and so on. They have 5 minutes as an execution time limit.

State machines can be started in lots of different ways: * API gateway * IoT rules * EventBridge * Lambda * Manually * Others

You can use a template to create and export state machines once they’re configured: you use the Amazon States Language (ASL), which it’s JSON-based.

States

  • Succeed

  • Fail

  • Wait: holds the process for a duration or until a date and time.

  • Choice

  • Parallel: creates parallel flows.

  • Map: performs an action for each element of the input list.

  • Task: actually performs an action. Supported executors are:

    • Lambda

    • AWS Batch

    • DynamoDB

    • Elastic Container Service

    • SNS

    • SQS

    • Glue

    • SageMaker

    • EMR

    • Others