Hi,
I am trying to understand the best way to remove and add an instance to a target group. Basically, what I want to do is
Query an ALB to get the list of the target groups by supplying the name of the ALB ( in a variable ).
Filter the list to get the target group that we need ( using a regular expression as the target group name can change from time to time ) from the list returned by the above query…
Remove an instance one at a time from the target group.
Is this target group maintained by a scaling group, or are they all “pets”? A “pet” being an instance that is in some way uniquely configured.
The usual way to get things updated is to make a new AMI incorporating your changes, test the new AMI in a dev environment, then if all is well update the launch configuration to use the new AMI and start killing the running instances; they will be replaced by instances based on your new, improved AMI.
Thanks for the reply. Basically, I am trying to do a deployment like what we usually do in the instances connected to an ELB. I do not need to update the AMI for the deployment.
Basically, if there are 2 instances behind the target group, I would take one of them out first, do the deployment and put it back to the target group. I would repeat the same for the other instance too.