I created a Lambda Step Function flow that on one step it will wait until that step is resumed by callback Token. For testing purposes, I invoke the step function 1000 times. 600 invocations completed successfully but 400 are still in running state (because the process failed of DB connection fail) and I know that it will never resume. How can I stop the functions in bulk? Currently, I see only one option to stop execution on every single execution, but i have to do it 400 times which is a lot.
Asked
Active
Viewed 1,136 times
2
-
1Does this answer your question? [How to stop all running Step Functions of a specific state machine?](https://stackoverflow.com/questions/64845076/how-to-stop-all-running-step-functions-of-a-specific-state-machine) – Archmede May 31 '22 at 15:22
1 Answers
0
Found the answer thanks to @Pål Brattberg
aws stepfunctions list-executions
--state-machine-arn <STEP FUNCTION ARN>
--status-filter RUNNING
--query "executions[*].{executionArn:executionArn}"
--output text |
xargs -I {} aws stepfunctions stop-execution
--execution-arn {}
More info How to stop all running Step Functions of a specific state machine?

Medin
- 412
- 4
- 17