Why not just deploy the code directly to EC2 in the AutoScaling group instead of updating the launch template?
Blue/Green deployment of AutoScaling groups is not supported by CloudFormation, so you will need to create Lambda etc. as shown in the blog below.
I'm no expert, but I think all you have to do is rename your CodeDeploy.
CloudFormation will create a new CodeDeploy for you by keeping resources that are currently in use. Of course, make sure you don't rename your other resources.
For exemple, if tou have this code:
You can do that:
Please don't rename other ressources because CloudFormation will destroy and create new ones.
@Riku_Kobayashi Can you tell me if I'm wrong or not? (It's my first comment on re:Post)
- Accepted Answerasked 2 years ago
- Accepted Answerasked 8 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 9 months ago
- I can't use Amazon EC2 Auto Scaling to launch EC2 instances with encrypted AMIs or encrypted volumesAWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 4 years ago
- EXPERTpublished 6 months ago