Advertisement
Beginner AWS, Auto Scaling Groups

What is a launch template and how is it used by an Auto Scaling Group?

Short answer

A launch template is a reusable configuration that specifies exactly how new EC2 instances should be created, including the Amazon Machine Image, instance type, security groups, and storage settings, and an Auto Scaling Group references a launch template to know precisely how to…

Save AWS mock interview
Advertisement
AModel answer
A launch template is a reusable configuration that specifies exactly how new EC2 instances should be created, including the Amazon Machine Image, instance type, security groups, and storage settings, and an Auto Scaling Group references a launch template to know precisely how to configure every new instance it launches, ensuring consistency across all instances in the group.
aws ec2 create-launch-template --launch-template-name my-template --launch-template-data '{"ImageId":"ami-12345678","InstanceType":"t3.medium"}'
Real-world example
A DevOps team updates a launch template with a new Amazon Machine Image containing security patches, and any future instances launched by the Auto Scaling Group automatically use this updated, patched configuration.
Likely follow-ups
  • What is the difference between a launch template and the older launch configuration?
  • Can you have multiple versions of the same launch template?
Related topics