user1187968
user1187968

Reputation: 8036

AWS/Step start_execution() multiple times

I have the following code to trigger a step function.

client = boto3.client('stepfunctions')
response = client.start_execution(
    stateMachineArn=stateMachineArn,
    name=name,
    input={'id': 'my-id'},
    headers={'mode': 'normal'}
)

What would happen if I trigger the the same step function with the same "name". Does the existing step function restart, and everything start from fresh inside the step function instance?

Upvotes: 0

Views: 900

Answers (1)

Mark B
Mark B

Reputation: 201138

This is clearly detailed in the documentation:

StartExecution is idempotent for STANDARD workflows. For a STANDARD workflow, if StartExecution is called with the same name and input as a running execution, the call will succeed and return the same response as the original request. If the execution is closed or if the input is different, it will return a 400 ExecutionAlreadyExists error. Names can be reused after 90 days.

StartExecution is not idempotent for EXPRESS workflows.

Upvotes: 1

Related Questions