sam local execution stop - AWS Serverless Application Model

sam local execution stop

Stop a running durable function execution.

Note

This command may not require access to AWS 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 AWS Region of the service (for example, us-east-1).

--profile TEXT

Select a specific profile from your credential file to get AWS 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 AWS 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()"