Skip to main content

AUTOSCALING IN AWS



AWS Auto Scaling monitors your applications and automatically adjusts capacity to maintain steady, predictable performance at the lowest possible cost.Here first we will create an image out of vm before placing it in autoscaling group.We have already a vm created.First create an image out of it.From Actions > Image > Create Image.Give necessary details and give ok.







 CREATION OF AUTOSCALING GROUP
First we want to Launch Configuration for autoscaling group.While creating configuration we have to specify details such as instance type,configuration name,security group and so on.







Now we have created configuration for auto scaling group.Now we want to create auto scaling group.On first wizard we have to give details about  groupname,group size,network and subnet details we want and click next.






Here we have to set scaling policies.Click on use scaling policies to adjust capacity of this group.There will be two options simple scaling policy and step by step advanced policy.We will go with advanced one.



Here we will give name, alarm, action(when we want to apply our policy) and son on.We will create our own alarm policy.Here I created an alarm named cpu>35 which will alarm when average cpu percent will be more than 35%.Now give the action we want.Here we created action to increase vm count by 1 when average cpu >35% and again increase by 1 when cpu average >50.






Similarly set scale in policy.For that also I created a policy to scale down when average cpu utilization is less than 30.




Next is configure notification section.Here we are not setting any notification.So we are keeping as it is. Click next.Here we can add tag if we want and then click next.Then click create auto scaling group.