What is EC2 Launch Template?
An Amazon EC2 Launch Template is a resource used to specify the configuration details for launching instances (virtual servers) in the Amazon Elastic Compute Cloud (EC2). Launch templates simplify the process of launching instances by providing a predefined set of instance configuration parameters. This includes the Amazon Machine Image (AMI), instance type, key pair, security groups, and other settings. Learn more about EC2 Launch Template – Key Components, Benefits & Use Cases here.
In this article, we will look into the step by step instructions to create your first EC2 launch template. Let us get started.
Creating an EC2 Launch Template – Step-by-Step
Let’s create a new launch template for Amazon Linux.
1. Login to the AWS console and navigate to EC2
2. AWS Launch template section. Click on Create Launch Template
3. Enter the new launch template name
4. Select the OS image and architecture
5. Select the instance type and key pair
6. Select the subnet and security group
7. Select the root volume size and add the standard tags for your organization
8. 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
9. You can also add the “user data” to execute once the instance is getting started
10. Create the launch template
11. New launch template has been successfully created
12. Here we can see the newly created launch template
13. Let’s launch a new instance using the newly created launch template. Select the template and from actions – Select “Launch Instance from template”
14. For new instance launch, You just need to provide the number of instances required to launch
15. Here we can see that new instance has been successfully launched
16. Here we can see that instance is starting
Conclusion
EC2 Launch Templates simplify the process of launching instances by providing a central and versioned location for storing configuration details. They are commonly used in dynamic environments where instances need to be launched and terminated based on demand.
Read more on AWS
AWS for Beginners: How to Create an Amazon ECS Cluster – Part 69
AWS for Beginners: How to Access the AWS EC2 Instance Serial Console – Part 68
AWS for Beginners: How to Create & Manage EC2 Instances using AWS CLI – Part 67
Follow our Twitter and Facebook feeds for new releases, updates, insightful posts and more.