Use DeleteDeploymentGroup with a CLI - AWS SDK Code Examples

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

Use DeleteDeploymentGroup with a CLI

The following code examples show how to use DeleteDeploymentGroup.

CLI
AWS CLI

To delete a deployment group

The following delete-deployment-group example deletes a deployment group that is associated with the specified application.

aws deploy delete-deployment-group \ --application-name WordPress_App \ --deployment-group-name WordPress_DG

Output:

{ "hooksNotCleanedUp": [] }
PowerShell
Tools for PowerShell

Example 1: This example deletes the deployment group with the specified name for the specified application. The command will prompt for confirmation before proceeding. Add the -Force parameter to delete the deployment group without a prompt.

Remove-CDDeploymentGroup -ApplicationName MyNewApplication -DeploymentGroupName MyNewDeploymentGroup