Menu
AWS Systems Manager
User Guide

Canceling a Command

You can attempt to cancel a command as long as the service shows that it is in either a Pending or Executing state. However, even if a command is still in one of these states, we cannot guarantee that the command will be terminated and the underlying process stopped.

Note

The following procedure describes steps that you perform in the Amazon EC2 console. You can also perform these steps in the new AWS Systems Manager console. The steps in the new console will differ from the steps below.

To cancel a command using the console

  1. In the navigation pane, choose Run Command.

  2. Select the command invocation that you want to cancel.

  3. Choose Actions, Cancel Command.

To cancel a command using the AWS CLI

Use the following command.

Copy
aws ssm cancel-command --command-id "command ID" --instance-ids "instance ID"

For information about the status of a cancelled command, see Setting Up Events and Notifications.