This page is under regular updates. Please check back later for more content.
Compute
Elastic Compute Cloud
Auto Scaling

Auto Scaling

Auto Scaling is a service that automatically adjusts the number of instances in an Auto Scaling group to maintain the desired capacity and availability. You can use Auto Scaling to automatically scale in and out based on the demand or schedule. Auto Scaling helps you ensure that you have the correct number of instances to handle the load for your application.

Features of Auto Scaling

  • Dynamic Scaling: Automatically adjusts the number of instances in an Auto Scaling group based on demand.
  • Scheduled Scaling: Allows you to schedule the scaling actions based on time or date.
  • Predictive Scaling: Uses machine learning algorithms to forecast the demand and scale proactively.
  • Health Checks: Monitors the health of instances and replaces unhealthy instances automatically.
  • Instance Protection: Prevents Auto Scaling from terminating specific instances during scale-in actions.

Components of Auto Scaling

Auto Scaling consists of the following components:

  • Auto Scaling Group: A collection of EC2 instances that share similar characteristics and are treated as a logical grouping for scaling and management.
  • Launch Configuration: A template that defines the instance type, AMI, key pair, security groups, and block device mapping for the instances in the Auto Scaling group.
  • Launch Template: A more flexible and feature-rich version of the launch configuration that allows you to specify additional parameters like instance types, instance purchasing options, instance tags, security groups, and network interfaces.
  • Scaling Policies: Define the scaling actions to take when certain conditions are met, such as scaling out when the average CPU utilization is above a certain threshold.
  • Scaling Plans: A collection of scaling policies that define how the Auto Scaling group should scale based on the demand or schedule.

Creating an Auto Scaling Group

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/ (opens in a new tab).
  2. In the navigation pane, choose Auto Scaling Groups.
  3. Choose Create Auto Scaling group.
  4. Enter a name for the Auto Scaling group.
  5. Choose the launch configuration or launch template.
  6. Configure the Auto Scaling group settings, such as the desired capacity, minimum capacity, maximum capacity, and health check type.
  7. Choose Create Auto Scaling group.

Scaling Policies

Scaling policies define the scaling actions to take when certain conditions are met. You can create the following types of scaling policies:

  • Target Tracking Scaling: Scales the Auto Scaling group based on a target value, such as average CPU utilization or request count per target.
  • Step Scaling: Scales the Auto Scaling group based on the size of the alarm breach.
  • Simple Scaling: Scales the Auto Scaling group based on a single, specified adjustment value.