Ref: https://learn.cantrill.io/courses/1820301/lectures/41301442
EC2 Launch Configuration (LC)
- 🔧 A document where you can define the configuration of an EC2 instance in advance:
- AMI, instance type & size, storage, SSH key pair, NWing & SGs, user-data, instance role…
- ‼️ NOT editable!! → defined once, configuration is then locked
- Editing a LC means creating a new LC
- ❗ Used by EC2 Auto Scaling Groups (ASGs) to launch instances in the group with the defined configuration…
- But can NOT be used to launch an EC2 instance outside of an ASG!
EC2 Launch Template (LT)
Diagram: https://github.com/acantril/aws-sa-associate-saac03/blob/main/1500-HA_and_SCALING/00_LEARNINGAIDS/LCandLT.png
- 🔧 A document that has a superset functionality of a LC
- 💡 LTs came after LCs, offering additional features & capabilities → AWS recommend using LTs over LCs
- Additional features over LCs
- Versioning
- ‼️ An LT is still NOT editable!! But you can have multiple versions of an LT with the same name.
- Can launch EC2 instances with defined configuration via EC2 console UI or AWS CLI
- Can work independently from an ASG!
- Support for more EC2 instance types and features
- Support for EC2 placement groups & EC2 capacity reservations
- Support for unlimited mode in burstable instances (T2/T3)
- …
- EC2 Auto Scaling Groups (ASGs) require an LT or an LC in order to know what EC2 instances to launch when scaling out