sam local execution stop - Amazon Serverless Application Model
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

sam local execution stop

Stop a running durable function execution.

Note

This command may not require access to Amazon credentials.

Usage

$ sam local execution stop DURABLE_EXECUTION_ARN [OPTIONS]

Required Arguments

DURABLE_EXECUTION_ARN

The Amazon Resource Name (ARN) of the durable function execution to stop.

Options

--error-message TEXT

Error message to associate with the stopped execution.

--error-type TEXT

Error type to associate with the stopped execution.

--error-data TEXT

Error data to associate with the stopped execution.

--stack-trace TEXT

Stack trace entries. This option can be specified multiple times.

--region TEXT

Set the Amazon Region of the service (for example, us-east-1).

--profile TEXT

Select a specific profile from your credential file to get Amazon credentials.

--config-env TEXT

Environment name specifying default parameter values in the configuration file. Default: default

--config-file TEXT

Configuration file containing default parameter values. Default: samconfig.toml

--save-params

Save the parameters provided via the command line to the configuration file.

--beta-features / --no-beta-features

Enable/Disable beta features.

--debug

Turn on debug logging to print debug messages generated by Amazon SAM CLI and display timestamps.

-h, --help

Shows this message and exits.

Examples

Stop execution without error details:

$ sam local execution stop arn:aws:lambda:us-east-1:123456789012:function:MyFunction:$LATEST/durable-execution/my-execution-name/my-execution-id

Stop execution with error message and type:

$ sam local execution stop arn:aws:lambda:us-east-1:123456789012:function:MyFunction:$LATEST/durable-execution/my-execution-name/my-execution-id --error-message "Execution cancelled" --error-type "UserCancellation"

Stop execution with full error details and stack trace:

$ sam local execution stop arn:aws:lambda:us-east-1:123456789012:function:MyFunction:$LATEST/durable-execution/my-execution-name/my-execution-id --error-message "Task failed" --error-type "TaskFailure" --error-data '{"reason":"timeout"}' --stack-trace "at function1()" --stack-trace "at function2()"