This page provides a reference for AWS Step Functions actions available in the workflow automation actions catalog. Use these actions to start, stop, redrive, and inspect Step Functions executions and state machines from within your workflow definitions.
Prerequisites
Before using AWS Step Functions actions in workflow automation, ensure you have:
- An AWS account with appropriate permissions.
- AWS credentials configured (IAM user credentials, IAM role ARN, or session credentials).
- The necessary IAM permissions for Step Functions operations.
See Set up AWS credentials for information on how to create IAM users and IAM roles, and set up static and session AWS credentials for integration with workflow automation AWS actions.
Required IAM permissions
The permissions you need depend on which Step Functions actions your workflow calls. Use the example below as a template for a least-privilege policy covering all seven actions.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "states:StartExecution", "states:StopExecution", "states:RedriveExecution", "states:DescribeExecution", "states:ListExecutions", "states:DescribeStateMachine", "states:ListStateMachines" ], "Resource": "arn:aws:states:<region>:<account-id>:*" } ]}Important
Replace <region> and <account-id> with your actual values, and restrict the Resource to specific state machine or execution ARNs where possible.
Start a Step Functions execution
The action identifier is aws.stepFunctions.startExecution.
Starts an execution of an AWS Step Functions state machine. On success, returns the executionArn of the new execution, which you can pass to aws.stepFunctions.describeExecution to poll its status.
The following table describes all available input fields for this action.
Input | Type | Description | Example |
|---|---|---|---|
awsRoleArn | String | Optional. IAM Role ARN to assume. Recommended. Takes precedence over key-based credentials when you supply both. |
|
awsAccessKeyId | String (secret) | Optional. AWS access key ID. Must be passed as a secret. |
|
awsSecretAccessKey | String (secret) | Optional. AWS secret access key. Must be passed as a secret. |
|
awsSessionToken | String (secret) | Optional. AWS session token for temporary credentials. Must be passed as a secret. |
|
region | String | Required. AWS region where the state machine is deployed. |
|
stateMachineArn | String | Required. ARN of the state machine to execute. |
|
name | String | Optional. Execution name. Must be unique per state machine. Auto-generated as a UUID if omitted. On |
|
input | String | Optional. JSON string to pass as input to the execution. |
|
traceHeader | String | Optional. X-Ray trace header to propagate into the execution. |
|
selectors | List | Optional. JQ selectors to extract specific fields from the action output. |
|
The following table describes all output fields returned by this action.
Output | Type | Description |
|---|---|---|
response | Object | Response from the AWS Step Functions API. |
success | Boolean |
|
errorMessage | String | Error message if the execution failed to start. |
The following example starts a remediation execution and captures the execution ARN for downstream steps.
Workflow example |
|---|
|
Stop a Step Functions execution
The action identifier is aws.stepFunctions.stopExecution.
Stops a running Step Functions execution. AWS marks the execution as ABORTED once it stops.
Important
This action is only supported on STANDARD state machines. It cannot stop EXPRESS executions.
The following table describes all available input fields for this action.
Input | Type | Description | Example |
|---|---|---|---|
awsRoleArn | String | Optional. IAM Role ARN to assume. Recommended. Takes precedence over key-based credentials when you supply both. |
|
awsAccessKeyId | String (secret) | Optional. AWS access key ID. Must be passed as a secret. |
|
awsSecretAccessKey | String (secret) | Optional. AWS secret access key. Must be passed as a secret. |
|
awsSessionToken | String (secret) | Optional. AWS session token for temporary credentials. Must be passed as a secret. |
|
region | String | Required. AWS region where the execution is running. |
|
executionArn | String | Required. ARN of the execution to stop. |
|
error | String | Optional. Short error code describing why the execution was stopped. |
|
cause | String | Optional. Human-readable explanation of why the execution was stopped. |
|
selectors | List | Optional. JQ selectors to extract specific fields from the action output. |
|
The following table describes all output fields returned by this action.
Output | Type | Description |
|---|---|---|
response | Object | Response from the AWS Step Functions API. |
success | Boolean |
|
errorMessage | String | Error message if stopping the execution failed. |
The following example aborts an execution that has exceeded its SLA.
Workflow example |
|---|
|
Redrive a Step Functions execution
The action identifier is aws.stepFunctions.redriveExecution.
Redrives a failed, timed-out, or aborted Step Functions execution, resuming it from the last unsuccessful state without starting over from the beginning.
Important
This action is only supported on STANDARD state machines. An execution can only be redriven if it has not SUCCEEDED, is within 14 days of completion, and has fewer than 24,999 history events.
The following table describes all available input fields for this action.
Input | Type | Description | Example |
|---|---|---|---|
awsRoleArn | String | Optional. IAM Role ARN to assume. Recommended. Takes precedence over key-based credentials when you supply both. |
|
awsAccessKeyId | String (secret) | Optional. AWS access key ID. Must be passed as a secret. |
|
awsSecretAccessKey | String (secret) | Optional. AWS secret access key. Must be passed as a secret. |
|
awsSessionToken | String (secret) | Optional. AWS session token for temporary credentials. Must be passed as a secret. |
|
region | String | Required. AWS region where the execution ran. |
|
executionArn | String | Required. ARN of the execution to redrive. |
|
clientToken | String | Optional. Idempotency token for the redrive request. Auto-generated by the SDK if omitted. |
|
selectors | List | Optional. JQ selectors to extract specific fields from the action output. |
|
The following table describes all output fields returned by this action.
Output | Type | Description |
|---|---|---|
response | Object | Response from the AWS Step Functions API. |
success | Boolean |
|
errorMessage | String | Error message if the redrive failed. |
The following example redrives a failed execution to resume it from its last unsuccessful state.
Workflow example |
|---|
|
Describe a Step Functions execution
The action identifier is aws.stepFunctions.describeExecution.
Returns the status, input, output, and timestamps for a Step Functions execution. Use this action to poll the result of an execution started by aws.stepFunctions.startExecution.
Important
This action supports STANDARD state machine executions directly. You can only describe EXPRESS executions that a Map Run dispatched.
The following table describes all available input fields for this action.
Input | Type | Description | Example |
|---|---|---|---|
awsRoleArn | String | Optional. IAM Role ARN to assume. Recommended. Takes precedence over key-based credentials when you supply both. |
|
awsAccessKeyId | String (secret) | Optional. AWS access key ID. Must be passed as a secret. |
|
awsSecretAccessKey | String (secret) | Optional. AWS secret access key. Must be passed as a secret. |
|
awsSessionToken | String (secret) | Optional. AWS session token for temporary credentials. Must be passed as a secret. |
|
region | String | Required. AWS region where the execution ran. |
|
executionArn | String | Required. ARN of the execution to describe. |
|
includedData | Enum | Optional. Controls whether the execution definition is returned. Use |
|
selectors | List | Optional. JQ selectors to extract specific fields from the action output. |
|
The following table describes all output fields returned by this action.
Output | Type | Description |
|---|---|---|
response | Object | Execution details from the AWS Step Functions API. On |
success | Boolean |
|
errorMessage | String | Error message if the request failed. |
The following example polls the status of an execution and captures the output for downstream steps.
Workflow example |
|---|
|
List Step Functions executions
The action identifier is aws.stepFunctions.listExecutions.
Lists executions of an AWS Step Functions state machine or map run, optionally filtered by status. Results are sorted most-recent first.
The following table describes all available input fields for this action.
Input | Type | Description | Example |
|---|---|---|---|
awsRoleArn | String | Optional. IAM Role ARN to assume. Recommended. Takes precedence over key-based credentials when you supply both. |
|
awsAccessKeyId | String (secret) | Optional. AWS access key ID. Must be passed as a secret. |
|
awsSecretAccessKey | String (secret) | Optional. AWS secret access key. Must be passed as a secret. |
|
awsSessionToken | String (secret) | Optional. AWS session token for temporary credentials. Must be passed as a secret. |
|
region | String | Required. AWS region to list executions in. |
|
stateMachineArn | String | Optional. ARN of the state machine whose executions to list. Provide this or |
|
mapRunArn | String | Optional. ARN of the map run whose child executions to list. Provide this or |
|
statusFilter | Enum | Optional. Filter executions by status. |
|
maxResults | Int | Optional. Maximum number of executions to return. Defaults to 100, maximum 1000. |
|
nextToken | String | Optional. Pagination token from a previous call's |
|
redriveFilter | Enum | Optional. Filter executions by whether they have been redriven. |
|
selectors | List | Optional. JQ selectors to extract specific fields from the action output. |
|
The following table describes all output fields returned by this action.
Output | Type | Description |
|---|---|---|
response | Object | List of executions from the AWS Step Functions API. |
success | Boolean |
|
errorMessage | String | Error message if the request failed. |
The following example lists the currently running executions for a state machine.
Workflow example |
|---|
|
Describe a state machine
The action identifier is aws.stepFunctions.describeStateMachine.
Returns the definition, IAM role, logging configuration, type (STANDARD or EXPRESS), and status of an AWS Step Functions state machine.
The following table describes all available input fields for this action.
Input | Type | Description | Example |
|---|---|---|---|
awsRoleArn | String | Optional. IAM Role ARN to assume. Recommended. Takes precedence over key-based credentials when you supply both. |
|
awsAccessKeyId | String (secret) | Optional. AWS access key ID. Must be passed as a secret. |
|
awsSecretAccessKey | String (secret) | Optional. AWS secret access key. Must be passed as a secret. |
|
awsSessionToken | String (secret) | Optional. AWS session token for temporary credentials. Must be passed as a secret. |
|
region | String | Required. AWS region where the state machine is deployed. |
|
stateMachineArn | String | Required. ARN of the state machine to describe. Also accepts a version ARN. |
|
includedData | Enum | Optional. Use |
|
selectors | List | Optional. JQ selectors to extract specific fields from the action output. |
|
The following table describes all output fields returned by this action.
Output | Type | Description |
|---|---|---|
response | Object | State machine details from the AWS Step Functions API. The |
success | Boolean |
|
errorMessage | String | Error message if the request failed. |
The following example retrieves the type and definition of a state machine.
Workflow example |
|---|
|
List state machines
The action identifier is aws.stepFunctions.listStateMachines.
Lists AWS Step Functions state machines in an account and region. Use pagination inputs to retrieve large result sets.
The following table describes all available input fields for this action.
Input | Type | Description | Example |
|---|---|---|---|
awsRoleArn | String | Optional. IAM Role ARN to assume. Recommended. Takes precedence over key-based credentials when you supply both. |
|
awsAccessKeyId | String (secret) | Optional. AWS access key ID. Must be passed as a secret. |
|
awsSecretAccessKey | String (secret) | Optional. AWS secret access key. Must be passed as a secret. |
|
awsSessionToken | String (secret) | Optional. AWS session token for temporary credentials. Must be passed as a secret. |
|
region | String | Required. AWS region to list state machines in. |
|
maxResults | Int | Optional. Maximum number of state machines to return. Defaults to 100, maximum 1000. |
|
nextToken | String | Optional. Pagination token from a previous call's |
|
selectors | List | Optional. JQ selectors to extract specific fields from the action output. |
|
The following table describes all output fields returned by this action.
Output | Type | Description |
|---|---|---|
response | Object | List of state machines from the AWS Step Functions API. |
success | Boolean |
|
errorMessage | String | Error message if the request failed. |
The following example lists state machines in the account and captures the result for downstream steps.
Workflow example |
|---|
|
What's next
To continue working with AWS actions and workflow automation, see the following resources.
- AWS credentials setup: Configure IAM roles and access keys for use with AWS actions.
- AWS Execute API: Call any AWS API directly when a dedicated action is not available.
- Workflow examples: See real-world workflow examples using AWS actions.