AWS Auto scaling without Load Balancer
27 November 2023 at 18:15
Create a instance with Ubuntu OS and with instance type as t2.nano and selected the existing key pair and security group and set 2 instance to create and launch.
Run the apdt update and install apache webserver and modify the index.html
sudo apt update
sudo apt install apache2 -y
sudo rm /var/www/html/index.html
sudo vim /var/www/html/index.html
<h1>Testing for Auto Scaling Group</h1>
Go to Action >Image and Template > Create Image
- set as noboot and create image
- Once image created Stop and Terminate the instance which we created
- Instance >Launch template >Create the launch template>Select AMI image.
- Instance type s t2.nano>select keypair >Existing security group> Advance Network Configuration >Enable "Auto Assign IP"
- Create Auto scaling Group >Select the template >Select all network availability zone >Select No Load balancing.
- Group size >Desired capacity as 1 >No scaling policies
- Select instance maintance policy as "Launch before Terminating"
- Add Notification >Create a topic and provide name of the topic and email ID to send notification > Unselect "Fail to launch & Terminate"
- Add Tag
- Once done Review all the settings and create a auto scaling group
- Verify the email and confirm the notification subscription
- Auto Scaling group has been create and launch the Instance from the AMI Image Template. you can monitor on the Activity tab.
- Verfiy the instance status
- If you stop the instance ASG-1 it will create the new instance using Auto scaling group monitor the process on the ASG Activity.
- These how auto scaling group works without load balancer.