Setting up Auto Scaling
This section introduces you to dynamic scaling for your deployed application. As explained, the application will scale out; more EC2 instances will be added or scaled in. That is, the running of EC2 instances will be removed, based on some measurable metric. We will select the metric from a defined set and apply rules so that our Auto Scaling can scale in or out based on these rules.
AWS Auto Scaling construction
To implement AWS Auto Scaling, we will create an Elastic Load Balancer (ELB), a base AMI which will be an EC2 instance running our e-commerce application, a launch configuration (the base AMI to launch in an EC2 instance), CloudWatch alarms to add/remove instances that apply to an Auto Scaling group, and finally an Auto Scaling group.
We will perform the steps in the following sections to implement auto scaling for our sample application.
Creating an AMI
An Amazon Machine Image (AMI) is a master image used for creating virtual servers on the Amazon cloud. An AMI...