Saturday, November 2, 2024

Lecture-48: What is Auto Scaling Group (ASG) in AWS?

Auto Scaling Groups in AWS are used to automatically scale your Amazon EC2 instances in response to changes in load.

There are three types of scaling activities:

* **Manual** scaling: You manually add and remove instances from the group.

* **Dynamic** scaling: You specify the desired capacity, and Amazon EC2 Auto Scaling automatically adds and removes instances to maintain that capacity.

* **Scheduled** scaling: You specify a schedule for Amazon EC2 Auto Scaling to add or remove instances.

To create an Auto Scaling group, you must specify the following:

* **Name**

* **VPC**

* **Launch configuration**

* **Min/max/desired capacity**

* **Health check type**

* **Scaling policies**

You can also specify the following optional settings:

* **Instance tags**

* **Notification Configurations**

* **LoadBalancers**

Once you have created an Auto Scaling group, you can use the following commands to manage it:

* **aws autoscaling describe-auto-scaling-groups**

* **aws autoscaling create-auto-scaling-group**

* **aws autoscaling delete-auto-scaling-group**

For more information, see the [AWS Auto Scaling documentation](https://docs.aws.amazon.com/autoscaling/ec2/userguide/).