Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Use GetDeploymentGroup with a CLI - AWS SDK Code Examples

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

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

Use GetDeploymentGroup with a CLI

The following code examples show how to use GetDeploymentGroup.

CLI
AWS CLI

To view information about a deployment group

The following get-deployment-group example displays information about a deployment group that is associated with the specified application.

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

Output:

{ "deploymentGroupInfo": { "applicationName": "WordPress_App", "autoScalingGroups": [ "CodeDeployDemo-ASG" ], "deploymentConfigName": "CodeDeployDefault.OneAtATime", "ec2TagFilters": [ { "Type": "KEY_AND_VALUE", "Value": "CodeDeployDemo", "Key": "Name" } ], "deploymentGroupId": "a1b2c3d4-5678-90ab-cdef-11111EXAMPLE", "serviceRoleArn": "arn:aws:iam::123456789012:role/CodeDeployDemoRole", "deploymentGroupName": "WordPress_DG" } }
PowerShell
Tools for PowerShell

Example 1: This example gets information about the specified deployment group.

Get-CDDeploymentGroup -ApplicationName CodeDeployDemoApplication -DeploymentGroupName CodeDeployDemoFleet

Output:

ApplicationName : CodeDeployDemoApplication AutoScalingGroups : {} DeploymentConfigName : CodeDeployDefault.OneAtATime DeploymentGroupId : 7d7c098a-b444-4b27-96ef-22791EXAMPLE DeploymentGroupName : CodeDeployDemoFleet Ec2TagFilters : {Name} OnPremisesInstanceTagFilters : {} ServiceRoleArn : arn:aws:iam::80398EXAMPLE:role/CodeDeploySampleStack-4ph6EX-CodeDeployTrustRole-O9MWP7XTL8EX TargetRevision : Amazon.CodeDeploy.Model.RevisionLocation
AWS CLI

To view information about a deployment group

The following get-deployment-group example displays information about a deployment group that is associated with the specified application.

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

Output:

{ "deploymentGroupInfo": { "applicationName": "WordPress_App", "autoScalingGroups": [ "CodeDeployDemo-ASG" ], "deploymentConfigName": "CodeDeployDefault.OneAtATime", "ec2TagFilters": [ { "Type": "KEY_AND_VALUE", "Value": "CodeDeployDemo", "Key": "Name" } ], "deploymentGroupId": "a1b2c3d4-5678-90ab-cdef-11111EXAMPLE", "serviceRoleArn": "arn:aws:iam::123456789012:role/CodeDeployDemoRole", "deploymentGroupName": "WordPress_DG" } }
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.