I’m wondering when one should use which one.
It seems Launchtemplates are more advanced because they allow for versioning but on the other side you cannot set EBS settings etc.
Is Launchtemplate a better version of Launchconfiguration or do they serve different purposes so meaning if you don’t want versioning stick with Launchconfigs with no harm for the future.
Thanks A
AWS recommend that we should use launch templates instead of launch configurations to ensure that we can leverage the latest features of Amazon EC2, such as T2 Unlimited instances. launch configurations are used with Auto Scaling Groups.
An Amazon Machine Image (AMI) is a template that contains a software configuration (for example, an operating system, an application server, and applications). From an AMI, you launch an instance, which is a copy of the AMI running as a virtual server in the cloud.
Launch templates versioning And from another side, the launch configuration, it's unchangeable and doesn't track changes. But the Launch templates support versioning.
A launch template is an Amazon Elastic Compute Cloud (EC2) feature that reduces the number of steps that are required to create an AWS instance by capturing all launch parameters within one resource.
According to this post on reddit:
Launch templates allow control of the T2 unlimited (credits) feature, at least that is the one feature I needed, so had to use launch templates.
However, it seems that a launch template specifies exactly one subnet, rather than a list (like launch configurations).
They're quite difference and CloudFormation and it has sucked up several hours of trial and error on my part to get them working.
From my experience, you cannot specify a subnet in either a launch configuration or launch template so I'm not sure where that came from. It appears to me that a launch template is the new version of a launch configuration but I have not seen anywhere that AWS is saying they'll deprecate launch configurations.
I do remember when they brought in application load balancers, it took a while for them to announce deprecation of classic load balancers so my gut feel is that's what will happen here too. Note the CloudFormation docs for Autoscaling Groups recommend using launch templates to get the latest features.
Personally, I'm still using launch configurations since it does not appear very hard to translate to launch templates if/when the time comes, AWS will even do it for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With