14 - Launch Configurations Vs Launch Templates Flashcards
1
Q
What is a launch configuration?
A
- A launch configuration is a template that an EC2 Auto Scaling group uses to launch EC2 instances.
- Specify information for the instances such as the
- ID of the Amazon Machine Image (AMI)
- instance type
- key pair
- one or more security groups
- block device mapping.
- Create an EC2 Auto Scaling group, you must specify a launch configuration.
- You can specify your launch configuration with multiple EC2 Auto Scaling groups.
- However, you can only specify one launch configuration for an EC2 Auto Scaling group at a time
- you can’t modify a launch configuration after you’ve created it.
- Changing a Launch Configuration
- Must create a launch configuration and then update your EC2 Auto Scaling group with the new launch configuration.
- When you change the launch configuration for your EC2 Auto Scaling group, any new instances are launched using the new configuration parameters, but existing instances are not affected.
2
Q
What is a Launch Template?
A
- Similar to a launch configuration, in that it specifies instance configuration information.
- Defining a launch template instead of a launch configuration allows you to have multiple versions of a launch template.
- It includes the
- ID of the Amazon Machine Image (AMI)
- instance type
- key pair
- security groups
- other parameters
- Versioning
- With versioning of launch templates, you can create a subset of the full set of parameters.
- Then, you can reuse it to create other versions of the same launch template.
- Launch templates are recommended over Launch Configurations
- Not all Amazon EC2 Auto Scaling features are available when you use launch configurations.
- For example, you cannot create an Auto Scaling group that launches both Spot and On-Demand Instances or that specifies multiple instance types.
- With launch templates, you can also use newer features of Amazon EC2.