AWS › Auto Scaling Groups
What is a launch template and how is it used by an Auto Scaling Group?
BeginnerAnswer
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.