page contents

About the Post

Author Information

Video: EC2 Autoscaling with ELB and RDS in Amazon Web Services’ VPC

The information provided in this video is meant as a tutorial. It is not the final word on security or setup for your particular case. In Simpler terms: USE at your own risk. That said, I hope it helps.
Loading the player …

Notes to go along with the video:
Add in html and apache (set apache to run on launch) index.html

A Small Hello from AWS
This is very minimal “Hello World” HTML document for the AutoScaling, ELB, and RDS in VPC.


chkconfig –level 345 httpd on
service httpd start
netstat -a (see if httpd is listing)

1. Do a Create Image (make an AMI)

2. Create Load Balancer production-lb in VPC

3. Commands used

as-create-launch-config MyLC –image-id ami-XXXXXXXX –instance-type m1.small –group sg-xxxxxxx –region us-west-2

as-create-auto-scaling-group MyGroup –launch-configuration MyLC –availability-zones “us-west-2b,us-west-2a” –min-size 2 –max-size 10 –vpc-zone-identifier
“subnet-XXXXXX,subnet-XXXXXXX” –default-cooldown 300 –load-balancers production-lb –region us-west-2

as-put-scaling-policy policy-scale-UP-on-CPU –auto-scaling-group MyGroup –type ChangeInCapacity –adjustment 2 –cooldown 300 –region us-west-2

mon-put-metric-alarm alarm-server-scale-UP –alarm-actions arn:aws:???????????????????? –metric-name CPUUtilization –unit Percent –namespace AWS/EC2 –statistic Average –dimensions=”AutoScalingGroupName=MyGroup” –period 60 –evaluation-periods 2 –threshold 60 –comparison-operator GreaterThanThreshold –region us-west-2

as-put-scaling-policy policy-scale-DOWN-on-CPU –auto-scaling-group MyGroup –type ChangeInCapacity “–adjustment=-2″ –region us-west-2

mon-put-metric-alarm alarm-server-scale-DOWN –alarm-actions arn:aws:??????????????????? –metric-name CPUUtilization –unit Percent –namespace AWS/EC2 –statistic Average –dimensions=”AutoScalingGroupName=MyGroup” –period 60 –evaluation-periods 5 –threshold 20 –comparison-operator LessThanThreshold –region us-west-2

as-update-auto-scaling-group MyGroup –min-size 0 –max-size 0 –region us-west-2

mon-describe-alarms –region us-west-2
mon-delete-alarms alarm-server-scale-UP –region us-west-2
mon-delete-alarms alarm-server-scale-DOWN –region us-west-2

as-describe-policies –region us-west-2
as-delete-policy policy-scale-UP-on-CPU –auto-scaling-group MyGroup –region us-west-2
as-delete-policy policy-scale-DOWN-on-CPU –auto-scaling-group MyGroup –region us-west-2

as-describe-auto-scaling-groups MyGroup –headers –region us-west-2
as-delete-auto-scaling-group MyGroup –region us-west-2
as-delete-launch-config MyLC –region us-west-2

Tags: , , , , , , , ,

4 Responses to “Video: EC2 Autoscaling with ELB and RDS in Amazon Web Services’ VPC”

  1. Eduardo #

    Very interesting video an fully explained my friend.
    I have a question.

    When you select ‘MultiA-Z’ in RDS section for your MySQL Instance, this feature let your database increase automatically?
    I’m new with AWS, and I’m looking for a tutorials like yours.

    I’m looking for a Windows EC2 Instance with ELB and AutoScaling for my site and for my Database Storage use SQL with Multi A-Z and Master/Slave and read instances…

    Can you help with this sharing a Video?

    Thank you very much again for your time to post the video and I hope you can help me .

    Best Regards.

    August 3, 2012 at 4:50 PM
  2. Thanks Lance! Really enjoyed every minute of this video and I learned a whole bunch of good stuff. Great job

    October 30, 2012 at 4:19 PM
  3. Dat #

    Thank you so much for your great tutorial! I have been looked into amazon aws solutions for our e-commerce site, and this has saved me many hours of research.


    January 16, 2013 at 5:43 PM
  4. Wow, this is great. Thank you for this post.

    Setting up VPC is a bit trickier (than non VPC auto scaling). I banged my head for a while until I got it to work properly. Thanks for the help!

    April 26, 2013 at 9:21 PM
Copy Protected by Chetan's WP-Copyprotect.