01 / 08

What is an Auto Scaling Group (ASG) and how does it work in EC2?

Understanding EC2 Auto Scaling Groups

An Auto Scaling Group (ASG) is a logical collection of EC2 instances that share similar characteristics. ASG automates the process of adding (scaling out) or removing (scaling in) instances to maintain application availability and match the current load based on defined policies.

Core Functionality
  1. 1

    Self-healing: Automatically replaces unhealthy instances to maintain the desired count.

  2. 2

    Cost Optimization: Scales down during low demand to save costs.

  3. 3

    Availability: Spreads instances across multiple Availability Zones to ensure high availability.

  4. 4

    Load Balancing: Integrates with Elastic Load Balancing (ELB) to distribute traffic to new instances.