Launch Template vs Launch Configuration and How to Migrate
Learn about the difference between launch template vs launch configuration and find out how to migrate from configurations to templates with our guide.
Learn about the difference between launch template vs launch configuration and find out how to migrate from configurations to templates with our guide.
Starting in 2023, AWS launch configurations stopped supporting newly released EC2 instance types, and by October 1, 2024, new AWS accounts will be unable to create new launch configurations altogether. AWS is urging all customers to switch from using launch configurations to launch templates to continue accessing new instance types and features.
Here are the key changes:
In this guide, we’ll explain the basics of launch configurations and launch templates, show the steps for migrating them over, and highlight the importance of starting an instance refresh to update existing instances automatically.
Launch Configurations and Launch Templates are both tools in AWS for defining instance settings for auto-scaling and launching EC2 instances, but they differ in flexibility and features:
Below is a comparison to illustrate the differences between Launch Templates and Launch Configurations:
Launch configurations are instance configuration settings utilized by an EC2 Auto Scaling group to inform the new EC2 instances it launches. You must specify standard information when setting up an AWS launch configuration, including the following:
For inspiration, you can use similar settings for previously launched EC2 instances if they match your use case. Once you create your launch configuration, you cannot make changes to it. You can only create a new one and update your Auto Scaling group to use the new one. If you do that, existing instances will not be immediately updated.
Launch templates function similarly to launch configurations by specifying instance configuration information with similar information you would place in a launch configuration file. The major difference between launch configurations and launch templates is that you can set up multiple versions of a launch template.
Versioning launch templates lets you establish a subset of the complete parameter set. You can reuse these to set up other versions of the base launch template. For example, you can create a launch template with a defined base configuration without including an AMI or user data script.
After creating the launch template, you can add a new version with the AMI and user script for testing. You end up with two versions of the template. That means you can always have a base configuration for reference, then create new template versions as needed. It’s also possible to delete test template versions when they are no longer necessary.
Launch templates enable accessing the latest improvements. Some Amazon EC2 Auto scaling features aren’t available when you use launch configurations. Launch templates also let you use newer generation features of Amazon EC2.
While launch parameters are optional, you can’t add an AMI to one if you do not specify it when creating an Auto Scaling group. If you specify an AMI but leave out the instance type, it’s possible to add one or more when setting up your Auto Scaling group.
Copying launch configurations to convert them to launch templates, you will need to use the AWS Management Console.
Anyone currently using launch configurations can migrate them over to launch templates by copying them into the console.
Follow the steps below if you wish to move all your launch configurations to launch templates in the console:
You can run this update-auto-scaling-group command:
An Auto Scaling group cannot have both a launch configuration and launch template parameter set. To update your Auto Scaling group to use a launch template instead of a launch configuration, you can include a launch template value in this command, like in this example:
Once you’ve migrated your Auto Scaling groups to use launch templates instead of launch configurations, you should stop creating new launch configurations and only create launch templates and new versions.
If you have several Auto Scaling groups, making these updates can be manual and time-consuming. You also can’t ensure that new launch configurations are not created and utilized in your AWS EC2 Auto Scaling groups.
With Blink, you can use a no-code automation to quickly identify Auto Scaling groups that are using launch configurations, convert those launch configurations to launch templates, and update the groups accordingly. You can also set up checks to detect new launch configurations and notify owners that they should use launch templates instead.
Get started with Blink today to see how easy automating workflows can be.
Blink is secure, decentralized, and cloud-native. Get modern cloud and security operations today.