AWS EC2 Auto Scaling : Launch Templates vs Launch Configurations

 


Launch configurations were the original way to define how a scaling group should operate. It had limited features. AWS eventually introduced Launch Templates which are currently the recommended approach for defining  Auto Scaling Groups (ASG)

Here are my high-level notes as I read through the docs

Launch Templates Vs. Launch Configurations


Versioning

Launch Templates 

Launch Templates can be versioned - unlike Launch Configuration. 

An Auto Scaling group will continue using a previous version of the Launch Template, and current instances remain unaffected. It is possible to update an ASG to use a newer Launch Template and also use this opportunity to refresh all the instances via a rolling update. This rolling update can be configured to ensure a certain percentage of instances remain alive while the refresh is in progress.

Launch Configuration

Launch configurations cannot be modified once created.

Dedicated Hosts

Only Launch Templates support the placement of EC2 instances in a dedicated host.


Multiple Instance Types

Launch Templates support multiple instance types. VM types specified in a launch template can be overridden in the Auto Scaling Group configuration.

Launch templates also allow the simultaneous configuration of on-demand and spot instances in an Auto Scaling Group. 

Launch Configuration Migration

Launch Configuration can be migrated to a Launch Template via the AWS Console.