Setting up auto scaling
This section introduces you to dynamic scaling for your deployed application. As explained, the application will either scale-out, that is, more EC2 instances will be added or scaled in, that is, running EC2 instances will be removed based on some measureable 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 create a working AWS auto scaling, we will create an Elastic Load Balancer (ELB), a base AMI (which will be our EC2 instance running our e-commerce application), Launch Configuration (that is, the base AMI to launch in an EC2 instance), and alarms in CloudWatch in order to add/remove instances that apply to an Auto Scaling Group (ASG). Perform the steps listed in the following sub-sections to setup auto scaling for your application.
Creating an AMI
An Amazon Machine Image (AMI) is a master image for the creation of virtual servers on the Amazon cloud...