LoginSignup
6
5

More than 5 years have passed since last update.

AutoScaling時に立ち上がるEC2インスタンスのNameタグに値を設定する

Posted at

aws-cliを導入済みの前提です。

参考
http://www.slideshare.net/serverworks/auto-scaling-17149997?ref=http://takachan.hatenablog.jp/entry/2013/06/23/172558
http://docs.aws.amazon.com/cli/latest/reference/autoscaling/create-auto-scaling-group.html

AutoScalingですが、ずっとCLIでの設定しかできなかったのですが、
http://qiita.com/eyesonly/items/35e4d3e5bf06b55dc85c
のようにManagementConsoleからできるようになりました。
しかし残念ながら、一部機能に制限があるようです。

特に気になっているのが、ScaleOut時に生成されるEC2のNameタグにつく値を設定出来ないのは惜しいところです。

なのでしばらくはCLIツールを利用する必要がありそうです。

Nameタグの設定は、AutoScalingGroupなので、そこだけの例です。

aws autoscaling create-auto-scaling-group \
--auto-scaling-group-name <AutoScalingGroup名> \
--launch-configuration-name <LaunchConfig名> \
--min-size 1 \
--max-size 4 \
--availability-zones ap-northeast-1a ap-northeast-1c \
--load-balancer-names <ELB名> \
--health-check-type ELB \
--health-check-grace-period 60 \
--vpc-zone-identifier <SubnetID>,<SubnetID> \
--tags Key=Name,Value=<EC2のNameタグに設定したい値>

早くManagementConsoleからも設定出来るようなるといいですね。

6
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
5