Scaling your Groups
- Auto Scaling Groups gives the options for
- Manual Scaling
- Attach Ec2 instances to ASG
- Detach EC2 instances from ASG
- Dynamic Scaling
- Manual Scaling
- Auto Scaling Group always tries to maintain desired count.
Dynamic Scaling
-
In Dynamic Scaling we have policies. AWS should be aware when to attach or when to detach ec2 instances.
-
Normally AWS uses Cloudwatch alarm. Depending on policy you select Cloud watch alarm might be created & Managed by you or AWS creates the Cloud watch alarms
-
The popular Policies for Dynamic scaling in AWS are
- Target Tracking scaling policies
- Step and Simple Scaling Policies
-
Target Tracking Scaling Policies:
- When you select a scaling metric & set the target value, AWS EC2 ASG creates & manages the Cloud watch alarm that triggers the scaling.
- Lets see the UI Options

-
Step and simple scaling policies for EC2 Auto scaling:
- We need to create a cloud watch alarm to trigger the scaling process
- In both step scaling and simple scaling create an alarm for increasing the ec2 instances and decreasing the ec2 instances.
-
Now if we visualize our state, add the load balancer will make sense as the number of ec2 instances is dynamic

-
Now lets create a application load balancer

-
Remember not to register targets while creating load balancer
-
Now lets navigate to autoscaling group and add the target group
-
Observe the targets in target group and use the load balancer A record

-
Next Set of Questions:
- How do i automate deployments of autoscaling groups?
- How do i manage multiple ec2 instances for administrative activities such as
- Patching
- Backups
-
Ensure AWS CLI is installed Refer Here
