Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cancel a Step Function in the Wait step

I need a step function that waits 2 days before processing a request. Within that two day period it's possible for a user to cancel the request with a follow up request. Is this achievable with step functions.

like image 307
H N Avatar asked Aug 28 '26 10:08

H N


1 Answers

It's certainly possible to stop a currently executing step function.

Using the AWS CLI as an example, you can call aws step functions stop-execution with an exeuction-arn:

$ aws step-function stop-execution --execution-arn <value>
    [--error <value>]
    [--cause <value>]
    [--cli-input-json <value>]
    [--generate-cli-skeleton <value>]

https://docs.aws.amazon.com/cli/latest/reference/stepfunctions/stop-execution.html

The stop-execution function is also available in the various AWS SDKs and client libraries.

like image 199
chris stamper Avatar answered Aug 30 '26 08:08

chris stamper



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!