- Launch Template contains the configuration information to launch an instance.
- Certain details about launching the instance can be parametrized
- Lets create a launch template to launch mylamp ami based ec2 instance
Auto Scaling Groups
- AWS EC2 Auto Scaling groups, will help us in running applications
- with fixed number of instances
- Which increase or decrease in number (auto scaling /elasticity) based on some metrics.
- Lets create an autoscaling group from launch template with fixed number of ec2 instances (2)
- Our desired capacity was 2 and we see 2 instances running
- Now lets manually delete one ec2 instance and look at ec2 instance management by autoscaling
- As experimented in the class, EC2 autoscaling group will always try to maintain desired capacity.
- Generally, We would want our applications to meet the customer demands and as we discussed earlier, to meet the peak demands, we should be able to scale the number of ec2 instances.
- So the next logical step would be to increase or decrease the number of ec2 instances based on some metric.
- Generally for Web applications cpu usage is the deciding factor.
- We can change this autoscaling group or create a new auto scaling group with dynamic scaling capabilities
- The basic idea behind the autoscaling is to dynamically identify the desired capacity