Table of Contents
- What is Launch Configuration?
- What is Launch Templates?
- Advantages of Launch Templates
- Creating an EC2 Launch Template
- Conclusion
In this article we will discuss the difference between AWS EC2 Launch Configuration and Launch Template, and how they work. Also, we will look into the step-by-step instructions on how to create a launch template.
AWS launch configurations and templates could appear to be pretty similar at first glance. Both allow you to define the EC2 Instance specifics. Let’s have a look at their differences and see which one we should prefer.
What is Launch Configuration?
AWS Launch configuration is an instance configuration template that an Auto Scaling group uses to launch EC2 instances since 2010. Launch configuration requires information like Amazon Machine Image (AMI), the instance type, a key pair, one or more security groups, and a block device mapping.
AWS strongly recommends that you do not use launch configurations. They do not provide full functionality for Amazon EC2 Auto Scaling or Amazon EC2. Amazon requests customers to migrate Launch configuration templates to Launch templates.
What is Launch Templates?
Launch Templates is not a new capability. It’s available since 2017. Launch Templates enable a new way of templating your launch requests. Launch Templates reduce the number of steps required to create an instance by capturing all launch parameters within one resource. This makes the process easy to reproduce.
Also, with support for Auto Scaling, Spot Fleet, Spot and On-Demand instances, Launch Templates make it easier to implement standards and best practices, helping you to manage costs better, improve your security posture, and minimize the risk of deployment errors. This capability is available at no additional cost
Advantages of Launch Templates
AWS has released many new features such as Mixed Instance Policies with Auto Scaling groups, Targeted Capacity Reservations, and unlimited mode for burstable performance instances that only work with launch templates.
Creating an EC2 Launch Template
Let’s create a new launch template for Amazon Linux.
- Login to AWS console and navigate to EC2
- AWS Launch template section. Click on Create Launch Template
- Enter the new launch template name
- Select the OS image and architecture
- Select the instance type and key pair
- Select the subnet and security group
- Select the root volume size and add the standard tags for your organization
- In Advanced settings, you could select the IAM role for the instance. Advanced details sections have other EC2 features which were missing in Launch configuration
- You can also add the “user data” to execute once the instance is getting started
- Create the launch template
- New launch template has been successfully created
- Here we can see the newly created launch template
- Let’s launch a new instance using the newly created launch template. Select the template and from actions – Select “Launch Instance from template”
- For new instance launch, You just need to provide the number of instances required to launch
- Here we can see that new instance has been successfully launched
- Here we can see that instance is starting
Conclusion:
Hope this article explained the key differences between EC2 – launch configuration and EC2- launch template.
AWS is phasing out the Launch configuration and insisting customers migrate to the launch template. Amazon is strongly discouraging customers to use the launch configuration since no further development will be done on that.
If you are looking to protect EC2 instances on Cloud, please check out BDRSuite. It’s a reliable backup and disaster recovery suite that offers a complete BDR solution for the entire IT Infrastructure – VMware, Hyper-V, Windows, Linux, Microsoft 365, Google Workspace, and AWS. You can also download a free 30-day trial of BDRSuite and try it in your environment.
Follow our Twitter and Facebook feeds for new releases, updates, insightful posts and more.