Skip to content

Instantly share code, notes, and snippets.

$ as-put-scaling-policy TEST_SCALE_POLICY --auto-scaling-group TEST_SCALE_INSTANCE_GROUP --adjustment=2 --type ChangeInCapacity
$ as-update-auto-scaling-group TEST_SCALE_INSTANCE_GROUP --launch-configuration ...
$ as-describe-auto-scaling-groups
$ as-create-auto-scaling-group TEST_SCALE_INSTANCE_GROUP --launch-configuration TEST_SCALE_INSTANCE --min-size 0 --max-size 20 --load-balancers TestScale --availability-zones ap-northeast-1a
as-delete-launch-config TEST_SCALE_INSTANCE
$ as-describe-launch-configs
$ as-create-launch-config TEST_SCALE_INSTANCE --image-id ami-******* --key hogehoge --group default --instance-type t1.micro --region ap-northeast-1
# Auto Scaling Command Line Tool Path
$ export AWS_AUTO_SCALING_HOME=$HOME/AutoScaling
$ export AWS_CREDENTIAL_FILE=$HOME/AutoScaling/credential-file-path
# CloudWatch Command Line Tool Path
$ export AWS_CLOUDWATCH_HOME=$HOME/CloudWatch
# ec2 keys
$ export EC2_PRIVATE_KEY=$HOME/ec2-keys/pk-****.pem
$ export EC2_CERT=$HOME/ec2-keys/cert-****.pem
$ cd AutoScaling
$ mv credential-file-path.template credential-file-path
$ vi credential-file-path
# AutoScaling/credential-file-path
AWSAccessKeyId=[Access Key ID]
AWSSecretKey=[Secret Access Key]
$ cd ../CloudWatch
$ mv credential-file-path.template credential-file-path
$ wget http://ec2-downloads.s3.amazonaws.com/CloudWatch-2010-08-01.zip
$ wget http://ec2-downloads.s3.amazonaws.com/AutoScaling-2011-01-01.zip
$ unzip CloudWatch-2010-08-01.zip
$ unzip AutoScaling-2011-01-01.zip
$ mv AutoScaling-1.0.61.3 AutoScaling
$ mv CloudWatch-1.0.13.4 CloudWatch