Canceling Steps - Amazon EMR

Canceling Steps

You can cancel pending and running steps using the AWS Management Console, the AWS CLI, or the Amazon EMR API.

To cancel steps using the AWS Management Console

  1. In the Amazon EMR console, on the Cluster List page, choose the link for the cluster.

  2. On the Cluster Details page, expand the Steps section.

  3. For each step you want to cancel, select the step from the list of Steps. Then choose Cancel step.

  4. In the Cancel step dialog, keep the default option Cancel the step and wait for it to exit. If you want to end the step immediately without waiting for any processes to complete, choose Cancel the step and force it to exit.

  5. Choose Cancel step.

To cancel steps using the AWS CLI

  • Use the aws emr cancel-steps command, specifying the cluster and steps to cancel. The following example demonstrates an AWS CLI command to cancel two steps.

    aws emr cancel-steps --cluster-id j-2QUAXXXXXXXXX --step-ids s-3M8DXXXXXXXXX s-3M8DXXXXXXXXX --step-cancellation-option SEND_INTERRUPT

With Amazon EMR version 5.28.0, you can choose one of the two following cancellation options for StepCancellationOption parameter when canceling steps.

  • SEND_INTERRUPT– This is the default option. When a step cancellation request is received, EMR will send a SIGTERM signal to the step child process until it ends.

  • TERMINATE_PROCESS – When this option is selected, EMR sends a SIGKILL signal to the step child process.