veer
veer

Reputation: 143

What is the use of "Attach to Autoscaling Group" in AWS?

I'm sorry if it feels like a dumb question to you.But I have to know this.

What is the use of "Attach to Auto-scaling Group" in AWS?

Let me be more specific about this question.

Suppose I have an auto-scaling group with a launch configuration. Lets name it ABC-asg I used ami-12345 for that launch configuration. Now I have another instance from ami-56789. Lets name my instance xyz and I've installed some packages in it. I attached my instance xyz to the autoscaling group ABC-asg.But the new instances launched by that asg are using ami-12345.

My questions are

1.What is the use of attaching my instance to an existing auto-scaling group?

2.If it is about the "different ami" in my instance. So if I attach an instance with "same ami" will my packages replicated to the next instances launched by the asg?

Please someone help me with this question.

Upvotes: 0

Views: 995

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 269284

The Attach to Auto-scaling Group simply adds the given instance to the Auto Scaling group. This means the instance will be part of the group of instances that can receive traffic from a Load Balancer associated with the group and it also means that Auto Scaling might Terminate the instance when scaling-in a group.

The only different between an instance attached to an Auto Scaling group in this manner is that it was not created by Auto Scaling.

So, why have such a command? Here's a few scenarios:

  • You have a new version of software or a different server configuration that you wish to test. You can attach the instance to the Auto Scaling group and monitor its performance without having to update the whole group.
  • You have an instance in an Auto Scaling group that is misbehaving. You can remove it from the group with the Detach Instances command and examine the instance to perform forensic analysis to determine what is going wrong. You could then put it back into the group with the Attach Instances command.
  • AWS customers asked for the ability

Attaching/detaching an instance in no way affects your Launch Configuration. Any additional instances launched by Auto Scaling will not be impacted by an attach/detach command -- they will launch using the existing Launch Configuration.

Upvotes: 4

Related Questions