I want to replace the launch configuration
with a launch template
for my existing Elastic Beanstalk environment.
In the EC2 dashboard I created a launch template and selected it in the existing EB auto-scaling group. Now this works fine until I go into the EB dashboard and change the auto-scaling configuration:
This sets the previous launch configuration again, replacing the launch template I have set earlier.
How can I make sure the launch template is kept for the auto-scaling group, even when I change the config in the EB dashboard?
I would assume to set the launch template in the EB config and do a rolling update, but in the General Options
of the EB config docs there is the aws:autoscaling:launchconfiguration
option but no aws:autoscaling:launchtemplate
.
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html
But when you google for "aws:autoscaling:launchtemplate"
there are a few references to it.
Is EB config not compatible with launch templates yet?
According to AWS:
As a workaround, I am manually setting the Launch Template for the auto-scaling group, and it works. Only when updating configurations through Elastic Beanstalk, the original Launch Configuration is set again and has to be manually replaced with the Launch Template.