Continuing Long-running Workflow Executions as a New Execution - Amazon Step Functions
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Continuing Long-running Workflow Executions as a New Execution

Amazon Step Functions is designed to run workflows that have a finite duration and number of steps. Executions have a maximum duration of one year, and a maximum of 25,000 events (see Quotas).

For long-running executions, to avoid reaching the hard quota of 25,000 entries in the execution event history, we recommend that you start a new workflow execution directly from the Task state of a state machine. This allows you to break your workflows into smaller state machines, and to continue your ongoing work in a new execution. To start these workflow executions, call the StartExecution API action from your Task state and pass the necessary parameters.

Alternatively, you can also implement a pattern that uses a Lambda function to start a new execution of your state machine to split ongoing work across multiple workflow executions.

This tutorial shows you both the approaches to continue workflow executions without exceeding service quotas.