Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EC2 autoscaling does not put name (tag) on servers

I've created an autoscaling group on EC2 and it's working just fine. Servers scale up and down depending on load. I'd like to have a little more info on the management side and am wondering if there's a way to get the autoscaling group to dynamically add names to the instances that it boots up. I'm referring to adding a Tag with key=Name and value=autogeneratedid.

For example, if I had an autoscaling group called test-group, servers would boot up with the following names:

test-group-1
test-group-2
test-group-3
...

I'd like to find them an enumerate them in the EC2 Management Console, but right now they're just showing up as "empty" names (the Tag key=Name isn't explicitly set on the instances).

Any ideas?

like image 284
joelpoloney Avatar asked Oct 09 '12 22:10

joelpoloney


1 Answers

In order to get the tags to be set on the instances, make sure you are setting the PropagateAtLaunch flag ("p=1") for the tag in the Auto Scaling Group.

You'll want to read this section in Amazon's documentation:

http://docs.amazonwebservices.com/AutoScaling/latest/DeveloperGuide/ASTagging.html

As far as having Amazon dynamically adding parameters to the tag value, I'm not aware of any such feature.

like image 111
Eric Hammond Avatar answered Sep 17 '22 22:09

Eric Hammond