Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Amazon States Language Supported Features

Tyler Replogle edited this page Jan 11, 2021 · 20 revisions

This page shows the features of Amazon States Language that the State conductor supports. If the feature is listed its supported if its crossed out its not supported.

Page Sections:

State Machine Definition (Top Level Fields)

Comment

A human-readable description of the state machine.

StartAt

A string that must exactly match (is case sensitive) the name of one of the state objects.

TimeoutSeconds

The maximum number of seconds an execution of the state machine can run. If it runs longer than the specified time, the execution fails with a States.Timeout Error Name.

Version

The version of the Amazon States Language used in the state machine (default is "1.0"). State Conductor doesn't do anything with this field

States

object containing a comma-delimited set of states

State (Type="Task")

Type

the state's type

Comment

Holds a human-readable description of the state

Next

The name of the next state that is run when the current state finishes. Some state types, such as Choice, allow multiple

transition

states one of "Next" or "End" is required

End

Designates this state as a terminal state (ends the execution) if set to true. There can be any number of terminal states per state machine. Only one of Next or End can be used in a state. Some state types, such as Choice, don't support or use the End field one of "Next" or "End" is required

InputPath

A path that selects a portion of the state's input to be passed to the state's task for processing. If omitted, it has the value $ which designates the entire input. For more information, see Input and Output Processing)

OutputPath

A path that selects a portion of the state's input to be passed to the state's output. If omitted, it has the value $ which designates the entire input. For more information, see Input and Output Processing

Resource

A URI, especially an Amazon Resource Name (ARN) that uniquely identifies the specific task to execute In ML, this should be the path to a module to be invoked

Parameters

Used to pass information to the API actions of connected resources. The parameters can use a mix of static JSON and JsonPath. For more information, see Pass Parameters to a Service API

ResultPath

Specifies where (in the input) to place the results of executing the task that's specified in Resource. The input is then filtered as specified by the OutputPath field (if present) before being used as the state's output. For more information, see path.

Retry

An array of objects, called Retriers, that define a retry policy if the state encounters runtime errors. For more information, see Examples Using Retry and Using Catch

Catch

An array of objects, called Catchers, that define a fallback state. This state is executed if the state encounters runtime errors and its retry policy is exhausted or isn't defined. For more information, see Fallback States

TimeoutSeconds

If the task runs longer than the specified seconds, this state fails. Must be a positive, non-zero integer. If not provided, the app servers default time out is used. If the time out is larger than the app servers max time out then the max time out value is used.

HeartbeatSeconds

If more time than the specified seconds elapses between heartbeats from the task, this state fails with a States.Timeout error name. Must be a positive, non-zero integer less than the number of seconds specified in the TimeoutSeconds field. If not provided, the default value is 99999999. For Activities, the count begins when GetActivityTask receives a token and ActivityStarted is logged in the Execution event history.

State (Type="Pass")

Type

The state's type

Comment

Holds a human-readable description of the state

Next

The name of the next state that is run when the current state finishes. Some state types, such as Choice, allow multiple transition states one of "Next" or "End" is required

InputPath

A path that selects a portion of the state's input to be passed to the state's task for processing. If omitted, it has the value $ which designates the entire input. For more information, see Input and Output Processing)

OutputPath

A path that selects a portion of the state's input to be passed to the state's output. If omitted, it has the value $ which designates the entire input. For more information, see Input and Output Processing

Result

Treated as the output of a virtual task to be passed to the next state, and filtered as specified by the ResultPath field (if present)

ResultPath

Specifies where (in the input) to place the "output" of the virtual task specified in Result. The input is further filtered as specified by the OutputPath field (if present) before being used as the state's output. For more information, see Input and Output Processing

Parameters

Create a collection of key-value pairs that will be passed as input. Values can be static, or selected from the input with a path. For more information, see InputPath and Parameters.

State (Type="Succeed")

Type

The state's type

Comment

Holds a human-readable description of the state

State (Type="Fail")

Type

The state's type

Comment

Holds a human-readable description of the state

Cause

Provides a custom failure string that can be used for operational or diagnostic purposes.

Error

Provides an error name that can be used for error handling (Retry/Catch), operational, or diagnostic purposes.

State (Type="Choice")

Type

The state's type

Comment

Holds a human-readable description of the state

Next

The name of the next state that is run when the current state finishes. Some state types, such as Choice, allow multiple transition states one of "Next" or "End" is required

InputPath

A path that selects a portion of the state's input to be passed to the state's task for processing. If omitted, it has the value $ which designates the entire input. For more information, see Input and Output Processing)

OutputPath

A path that selects a portion of the state's input to be passed to the state's output. If omitted, it has the value $ which designates the entire input. For more information, see Input and Output Processing

ResultPath

Specifies where (in the input) to place the results of executing the task that's specified in Resource. The input is then filtered as specified by the OutputPath field (if present) before being used as the state's output. For more information, see path.

Catch

An array of objects, called Catchers, that define a fallback state. This state is executed if the state encounters runtime errors and its retry policy is exhausted or isn't defined. For more information, see Fallback States

Choices

An array of Choice Rules that determines which state the state machine transitions to next

Choices[].Resource

A Non-Standard ML specific field that defines the ML module which should be invoke (must turn boolean)

Choices[].Next

The state to transition to should this choice match

Choices[].****

No other choice rule fields are currently supported

Default

The name of the state to transition to if none of the transitions in Choices is taken.

State (Type="Wait")

Type

the state's type

Comment

Holds a human-readable description of the state

Next

The name of the next state that is run when the current state finishes. Some state types, such as Choice, allow multiple transition states one of "Next" or "End" is required

End

Designates this state as a terminal state (ends the execution) if set to true. There can be any number of terminal states per state machine. Only one of Next or End can be used in a state. Some state types, such as Choice, don't support or use the End field one of "Next" or "End" is required

InputPath

A path that selects a portion of the state's input to be passed to the state's task for processing. If omitted, it has the value $ which designates the entire input. For more information, see Input and Output Processing)

OutputPath

A path that selects a portion of the state's input to be passed to the state's output. If omitted, it has the value $ which designates the entire input. For more information, see Input and Output Processing

Seconds

A time, in seconds, to wait before beginning the state specified in the Next field. one of Seconds, Timestamp, SecondsPath, TimestampPath required

Timestamp

An absolute time to wait until beginning the state specified in the Next field. one of Seconds, Timestamp, SecondsPath, TimestampPath required

SecondsPath

A time, in seconds, to wait before beginning the state specified in the Next field, specified using a path from the state's input data. one of Seconds, Timestamp, SecondsPath, TimestampPath required

TimestampPath

An absolute time to wait until beginning the state specified in the Next field, specified using a path from the state's input data. one of Seconds, Timestamp, SecondsPath, TimestampPath required.

State (Type="Parallel") NOT SUPPORTED

This feature is not yet supported it is in the backlog as an item to support. If you want this feature please comment on the issue.

Type

The state's type

Comment

Holds a human-readable description of the state

Next

The name of the next state that is run when the current state finishes. Some state types, such as Choice, allow multiple transition states one of "Next" or "End" is required

End

Designates this state as a terminal state (ends the execution) if set to true. There can be any number of terminal states per state machine. Only one of Next or End can be used in a state. Some state types, such as Choice, don't support or use the End field one of "Next" or "End" is required

InputPath

A path that selects a portion of the state's input to be passed to the state's task for processing. If omitted, it has the value $ which designates the entire input. For more information, see Input and Output Processing)

OutputPath

A path that selects a portion of the state's input to be passed to the state's output. If omitted, it has the value $ which designates the entire input. For more information, see Input and Output Processing

Branches

An array of objects that specify state machines to execute in parallel. Each such state machine object must have fields named States and StartAt, whose meanings are exactly like those in the top level of a state machine.

ResultPath

Specifies where (in the input) to place the output of the branches. The input is then filtered as specified by the OutputPath field (if present) before being used as the state's output. For more information, see Input and Output Processing.

Retry

An array of objects, called Retriers, that define a retry policy if the state encounters runtime errors. For more information, see Examples Using Retry and Using Catch

Catch

An array of objects, called Catchers, that define a fallback state. This state is executed if the state encounters runtime errors and its retry policy is exhausted or isn't defined. For more information, see Fallback States

State (Type="Map") NOT SUPPORTED

This feature is not yet supported it is in the backlog as an item to support. If you want this feature please comment on the issue.

Type

The state's type Task

Comment

Holds a human-readable description of the state

Next

The name of the next state that is run when the current state finishes. Some state types, such as Choice, allow multiple transition states one of "Next" or "End" is required

End

Designates this state as a terminal state (ends the execution) if set to true. There can be any number of terminal states per state machine. Only one of Next or End can be used in a state. Some state types, such as Choice, don't support or use the End field one of "Next" or "End" is required

InputPath

A path that selects a portion of the state's input to be passed to the state's task for processing. If omitted, it has the value $ which designates the entire input. For more information, see Input and Output Processing)

OutputPath

A path that selects a portion of the state's input to be passed to the state's output. If omitted, it has the value $ which designates the entire input. For more information, see Input and Output Processing

Iterator

The “Iterator” field’s value is an object that defines a state machine which will process each element of the array

ItemsPath

The “ItemsPath” field’s value is a reference path identifying where in the effective input the array field is found. For more information, see ItemsPath.

MaxConcurrency

The “MaxConcurrency”field’s value is an integer that provides an upper bound on how many invocations of the Iterator may run in parallel. For instance, a "MaxConcurrency" value of 10 will limit your Map state to 10 concurrent iterations running at one time.

ResultPath

Specifies where (in the input) to place the output of the branches. The input is then filtered as specified by the OutputPath field (if present) before being used as the state's output. For more information, see Input and Output Processing.

Retry

An array of objects, called Retriers, that define a retry policy if the state encounters runtime errors. For more information, see Examples Using Retry and Using Catch

Catch

An array of objects, called Catchers, that define a fallback state. This state is executed if the state encounters runtime errors and its retry policy is exhausted or isn't defined. For more information, see Fallback States

Error Handling

States.ALL

A wildcard that matches any known error name

States.Timeout

A Task state either ran longer than the TimeoutSeconds value, or failed to send a heartbeat for a period longer than the HeartbeatSeconds value.

States.TaskFailed

States.TaskFailed

States.Permissions

States.Permissions

*

A wildcard that matches any known error name

fn.error()

Non-standard ML Specific field The QName of a marklogic reported error