A Developer's Guide to AWS Auto Scaling

Vipul Patel walks developers through the basics of Amazon Web Services (AWS) Auto Scaling and how to use it.

by Vipul Patel

Aug 19, 2013

As we learned in earlier articles, Amazon offers resizable compute capacity in the cloud. To help with EC2 Elastic Computing resources, Amazon offers Auto Scaling, a service that allows launching or terminating EC2 instances based on user preferences and user-defined schedule. This allows the applications that are running on EC2 instances to scale up with increased traffic and scale down when traffic dies down. This also facilitates keeping costs down since the infrastructure only runs when there is a need. Auto scaling is suitable for applications where there are spikes in traffic.

Auto scaling can be configured to invoke/decommission EC2 instances depending on Amazon CloudWatch metrics, or according to a schedule.

Auto Scaling is automatically enabled by Amazon CloudWatch. There are no fees associated with Auto Scaling.

How to Use Auto Scaling

Auto scaling does not need any special sign up, if the user has already signed up for Amazon EC2 service. Auto Scaling can be used by any of the following:

Downloading the Auto Scaling command line tools and invoking commands

By creating an Auto Scaling Group and creating a Launch Configuration for the group using commands

By creating an alarm in CloudWatch to spin up new instances or remove instances depending on the condition being monitored.

When to Use Auto Scaling

Auto scaling is applicable for the following use cases:

When you want to automatically scale your AWS EC2 fleet.

When you want to ensure that a fixed number of EC2 instances are minimally run.

When you want to pair Auto Scaling with Elastic Load Balancing.

The best part of Auto Scaling is that there are no separate fees for using Auto Scaling.

Auto Scaling Groups

Auto Scaling Group is a logical grouping of EC2 instances that are managed together. For each scaling group, we need to define the minimum, maximum, and the desired number of running EC2 instances. A scaling plan needs to be created for each auto scaling group.

Summary

In this article, we learned about the basics of AWS Auto Scaling and explored an overview of the APIs required to perform Auto Scaling basics. I hope you have found the article useful.

Vipul Patel is a Program Manager currently working at Amazon Corporation. He has formerly worked at Microsoft in the Lync team and in the .NET team (in the Base Class libraries and the Debugging and Profiling team). He can be reached at vipul.patel@hotmail.com.