image.png

// Things we need to create for Autoscaling our project

1. ec2
2. image / ami
3. launch template
5. load balancer
4. target groups
5. autoscaling groups

1. Creating an EC2 instance

2. Creating image ( AMI ) out of EC2 machine

3. Creating a Launch Template

4. Target Group

5. Create AutoScaling Group and Load Balancer

ASG > asg-app-prod > Instance Management

image.png

EC2 Dashboard - 2 instances got generated automatically

image.png

if it stopped ASG will start a new instance automatically.

  1. Go to Load Balancer and change inbound rule to allow request at port:80

image.png

This will aloow traffic on port 80. Now you can visit loadbalancer_url make sure its http not https ( try Safari ) /host : it will show different IPs thus load is distributed.

7. Creating dynamic scaling policy