Archive

AutoScale

Stop / Suspend / Resume AutoScale

AutoScale can’t simple be stopped, how ever you can suspend it at any time. Suspend as-suspend-processes [as-group-name] Resume: as-resume-processes [as-group-name] Status: as-describe-auto-scaling-groups [as-group-name] –headers Note: Remember to set the environment variables that holds the AWS credentials export EC2_PRIVATE_KEY=/path/to/private-key export EC2_CERT=/path/to/cretificate

AutoScale – example

The following is my favorite example for AutoScaling based on CPU utlization Notes: I prefer the cool down to be 10 minutes to let the started instance enough time to initilize Make sure that the specified AZ are enabled in ELB, oterwize health check will fail How to: Step 1: as-create-launch-config AS-CONF-[name] –image-id [ami-id] –instance-type …

Getting ready for Auto-Scale on EC2

I’ve been asked many times, what do I need to prepare before setting up auto-scale. Here’s my short check-list  for auto scale preps: Basic AMI with auto deploy script running at boot Metrics for up scaling and down scaling e.g.: Upscale at 90% CPU for 5 minutes Downscale at 50% CPU for 10 minutes Good …

EC2 Auto scaling – Quick Reference

Create launch configuration as-create-launch-config AutoScaleServerConfig –image-id ami-b3558cda –instance-type m1.large –group auto-scale-nodes –key zlango_prd Create AS group as-create-auto-scaling-group AutoScaleServerGroup –launch-configuration AutoScaleServerConfig –availability-zones us-east-1a –min-size 1 –max-size 3 –cooldown 600 –load-balancers auto-scale-lb Create Up scale policy as-put-scaling-policy AutoScaleUpPolicy –auto-scaling-group AutoScaleServerGroup –adjustment=1 –type ChangeInCapacity –cooldown 600 Create Up scale alarm mon-put-metric-alarm AsHighCPUAlarm –comparison-operator GreaterThanThreshold –evaluation-periods 1 –metric-name CPUUtilization …