Skip to content

Instantly share code, notes, and snippets.

View santiagoprieto's full-sized avatar
🎯
Focusing

Santiago Prieto santiagoprieto

🎯
Focusing
View GitHub Profile
@santiagoprieto
santiagoprieto / aws-ami-codedeploy-agent.md
Last active April 11, 2023 19:57
AWS: How to remove baked in CodeDeploy Agent from AMI and set as User Data

AWS How to:

Remove baked in CodeDeploy Agent from AMI and set as User Data

It is a best practice to not have the CodeDeploy Agent baked into the AMI because AWS will update to new versions quite often. Once they deprecate a version, the AMI will stop being able to deploy new instances, therefore breaking the whole pipeline.

Instead, AWS recommends this CodeDeploy Agent install to be set as User Data within the EC2 Launch Configuration. Because we use CodePipline, CodeDeploy, Auto Scaling Groups, and Load Balancers, we need to change many interlaced pieces.

Instructions: