简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM