v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1737274251.5 KB

Updates an existing state machine by modifying its definition, roleArn, loggingConfiguration, or EncryptionConfiguration. Running executions will continue to use the previous definition and roleArn. You must include at least one of definition or roleArn or you will receive a MissingRequiredParameter error.

A qualified state machine ARN refers to a Distributed Map state defined within a state machine. For example, the qualified state machine ARN arn:partition:states:region:account-id:stateMachine:stateMachineName/mapStateLabel refers to a Distributed Map state with a label mapStateLabel in the state machine named stateMachineName.

A qualified state machine ARN can either refer to a Distributed Map state defined within a state machine, a version ARN, or an alias ARN.

The following are some examples of qualified and unqualified state machine ARNs:

  • The following qualified state machine ARN refers to a Distributed Map state with a label mapStateLabel in a state machine named myStateMachine.

    arn:partition:states:region:account-id:stateMachine:myStateMachine/mapStateLabel

    If you provide a qualified state machine ARN that refers to a Distributed Map state, the request fails with ValidationException.

  • The following qualified state machine ARN refers to an alias named PROD.

    arn:<partition>:states:<region>:<account-id>:stateMachine:<myStateMachine:PROD>

    If you provide a qualified state machine ARN that refers to a version ARN or an alias ARN, the request starts execution for that version or alias.

  • The following unqualified state machine ARN refers to a state machine named myStateMachine.

    arn:<partition>:states:<region>:<account-id>:stateMachine:<myStateMachine>

After you update your state machine, you can set the publish parameter to true in the same action to publish a new version. This way, you can opt-in to strict versioning of your state machine.

Step Functions assigns monotonically increasing integers for state machine versions, starting at version number 1.

All StartExecution calls within a few seconds use the updated definition and roleArn. Executions started immediately after you call UpdateStateMachine may use the previous state machine definition and roleArn.

post/#X-Amz-Target=AWSStepFunctions.UpdateStateMachine

Headers

X-Amz-Target'AWSStepFunctions.UpdateStateMachine' required

Request body

stateMachineArnstring required

The Amazon Resource Name (ARN) of the state machine.

definitionstring password

The Amazon States Language definition of the state machine. See <a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html">Amazon States Language</a>.

roleArnstring

The Amazon Resource Name (ARN) of the IAM role of the state machine.

publishboolean

Specifies whether the state machine version is published. The default is <code>false</code>. To publish a version after updating the state machine, set <code>publish</code> to <code>true</code>.

versionDescriptionstring password
<p>An optional description of the state machine version to publish.</p> <p>You can only specify the <code>versionDescription</code> parameter if you've set <code>publish</code> to <code>true</code>.</p>

Response

Success

updateDatestring date-time required

The date and time the state machine was updated.

revisionIdstring

The revision identifier for the updated state machine.

stateMachineVersionArnstring
<p>The Amazon Resource Name (ARN) of the published state machine version.</p> <p>If the <code>publish</code> parameter isn't set to <code>true</code>, this field returns null.</p>