AWS CodeDeploy Blue/Green with ASG - Failed Deployment Keeps Restarting EC2 Instances

Viewed 1037

My test application has 3 EC2 instances.

After a failed deployment, I noticed that the ASG keeps bringing back the failed instances.

So after 3 failed deployments, I now have 12 instances running: 9 from the failed deployments, 3 from the live servers.

How do I stop this from happening? Thanks.

3 Answers

According to this thread: https://forums.aws.amazon.com/thread.jspa?threadID=265522 they (AWS) have an backlog item to implement a way to delete automatically the ASG if the deployment fails but for know they suggests a creation of a lambda function that's delete it triggered by a failed deploy.

Related