I created a dummy application in Codedeploy, then created a deployment group and added one EC2 instance to it.
I have not done deployments yet.
I am trying to find the appropriate aws command that can get me a list of EC2 instances in the deployment group. Looking at the commands on this list , I checked a few such as list-deployment-instances. They all have this parameter deployment-id, which is -
Unique deployment identifier.
I assume this is generated after deployment. Correct me if I am wrong. In any case, I have not yet found a command that gives me a list of ec2 instances in the deployment group. Did I miss something?
Backgroud
- We have several EC2 instances behind the load balancer working in production, and some of them may have to be deployed using another git branch (to test some functions before rolling out on all instances, and this may need to be preserved during subsequent deployments )
- Our DevOps team does not yet use autoscaling. Thus, they manually call or contract instances.
- During the next deployment, we need to deploy the corresponding git branch to the instance group, depending on which git branch they are currently in. So before that, we would like to update the deployment group with a script that will do this by checking the version of git deployed in each of the instances.
Update - opening a bounty
, , ( ) , , , ?
, , , , . . AWS CLI . , - , .
. , , , AWS. , , , - AWS CLI - API, SDK,