jambonz / jambonz-infrastructure

packer and cloudformation templates for creating EC2-based jambonz deployments
23 stars 29 forks source link

AWS Cloudformation: Upgrade from using Launch Configurations to Launch Templates #21

Open PeterMijnster opened 2 years ago

PeterMijnster commented 2 years ago

As recommended by AWS, Launch Templates are the preferred way when using EC2 Auto Scaling Groups. Instead of referencing the "AWS::AutoScaling::LaunchConfiguration" use the "AWS::EC2::LaunchTemplate". The code currently used for the Launch Configuration pretty much goes directy into the Launch Configuration "LaunchTemplateData" property.

The launch templates also support versioning which makes it easier updating the AMI or UserData without redeploying everything. Another benefit of versioning is that you can easily revert to a previous Launch Template.

As an examply the current CFN on the right and my take on the left. Screenshot 2022-08-12 140307