The steps to completely configure a basic Amazon AWS:
- Create Load Balancer “MyProduct_LoadBalancer”
- Create Security Group “MyProduct_SecurityGroup”
- Create Key Pair “myname_keypair”
- Create Auto Scaling
-
as-create-launch-config MyProduct_LaunchConfig --image-id ami-0f904366 --instance-type t1.micro --group MyProduct_SecurityGroup --key myname_keypair
-
as-create-auto-scaling-group MyProduct_AutoScalingGroup --launch-configuration MyProduct_LaunchConfig --availability-zones us-east-1a,us-east-1b --min-size 1 --max-size 10 --load-balancers MyProduct_LoadBalancer
-
as-put-scaling-policy MyProduct_ScaleUpPolicy --auto-scaling-group MyProduct_AutoScalingGroup --adjustment=1 --type ChangeInCapacity --cooldown 300
-
as-put-scaling-policy MyProduct_ScaleDownPolicy --auto-scaling-group MyProduct_AutoScalingGroup --adjustment=-1 --type ChangeInCapacity --cooldown 300
-
as-describe-auto-scaling-groups MyProduct_AutoScalingGroup --headers AUTO-SCALING-GROUP GROUP-NAME LAUNCH-CONFIG AVAILABILITY-ZONES LOAD-BALANCERS MIN-SIZE MAX-SIZE DESIRED-CAPACITY AUTO-SCALING-GROUP MyProduct_AutoScalingGroup MyProduct_LaunchConfig us-east-1b,us-east-1a MyProduct_LoadBalancer 1 10 1 INSTANCE INSTANCE-ID AVAILABILITY-ZONE STATE STATUS LAUNCH-CONFIG INSTANCE i-3f63115a us-east-1a Pending Healthy MyProduct_LaunchConfig
- Create CloudWatch alarm
- Create RDS
- Create Route 53
Update Amazon AWS occasionally
Update Auto Scaling As AMI Changes. Ex. If ami-12345 is the new AMI id, then:
-
as-create-launch-config MyProduct_LaunchConfig2 --image-id ami-12345 --instance-type t1.micro --group MyProduct_SecurityGroup --key myname_keypair
-
as-update-auto-scaling-group MyProduct_AutoScalingGroup --launch-configuration MyProduct_LaunchConfig2 --availability-zones us-east-1a,us-east-1b --min-size 1 --max-size 10 --load-balancers MyProduct_LoadBalancer
-
as-delete-launch-config MyProduct_LaunchConfig