Note: You are viewing the documentation for an older major version of the AWS CLI (version 1).

AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. For more information see the AWS CLI version 2 installation instructions and migration guide.

[ aws . emr ]



Cancels a pending step or steps in a running cluster. Available only in Amazon EMR versions 4.8.0 and later, excluding version 5.0.0. A maximum of 256 steps are allowed in each CancelSteps request. CancelSteps is idempotent but asynchronous; it does not guarantee that a step will be canceled, even if the request is successfully submitted. When you use Amazon EMR versions 5.28.0 and later, you can cancel steps that are in a PENDING or RUNNING state. In earlier versions of Amazon EMR, you can only cancel steps that are in a PENDING state.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.


--cluster-id <value>
--step-ids <value>
[--step-cancellation-option <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]


--cluster-id (string)

The ClusterID for the specified steps that will be canceled. Use RunJobFlow and ListClusters to get ClusterIDs.

--step-ids (list)

The list of StepIDs to cancel. Use ListSteps to get steps and their states for the specified cluster.



"string" "string" ...

--step-cancellation-option (string)

The option to choose to cancel RUNNING steps. By default, the value is SEND_INTERRUPT .

Possible values:


--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.


CancelStepsInfoList -> (list)

A list of CancelStepsInfo , which shows the status of specified cancel requests for each StepID specified.


Specification of the status of a CancelSteps request. Available only in Amazon EMR version 4.8.0 and later, excluding version 5.0.0.

StepId -> (string)

The encrypted StepId of a step.

Status -> (string)

The status of a CancelSteps Request. The value may be SUBMITTED or FAILED.

Reason -> (string)

The reason for the failure if the CancelSteps request fails.