Use StopDeployment with a CLI - AWS SDK Code Examples

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

Use StopDeployment with a CLI

The following code examples show how to use StopDeployment.

CLI
AWS CLI

To attempt to stop a deployment

The following stop-deployment example attempts to stop an in-progress deployment that is associated with the user's AWS account.

aws deploy stop-deployment --deployment-id d-A1B2C3111

Output:

{ "status": "Succeeded", "statusMessage": "No more commands will be scheduled for execution in the deployment instances" }
PowerShell
Tools for PowerShell

Example 1: This example attempts to stop the deployment with the specified deployment ID.

Stop-CDDeployment -DeploymentId d-LJQNREYEX

Output:

Status StatusMessage ------ ------------- Pending Stopping Pending. Stopping to schedule commands in the deployment instances
  • For API details, see StopDeployment in AWS Tools for PowerShell Cmdlet Reference.