1

I have been using AWS Code deploy from the past 3 months. Every thing went nice. And suddenly When I want to deploy code to EC2 servers today. I am getting this strange error (after it is trying to deploy for more than 20 Minutes).

The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems. (Error code: HEALTH_CONSTRAINTS)

I don't understand what happened.I have not messed any thing with AWS at all,I just tried to deploy code as I always do. What could be the reason?

3
  • did you get the answers of this issue, i am facing same, pls help out. Commented May 17, 2017 at 11:20
  • No, not really. I am just using filezilla for now Commented May 17, 2017 at 11:58
  • If you visit the console you should be able to see which lifecycle event the instance deployment failed and why it failed. If you still need help around why it failed, do paste the error message without any sensitive information. Commented Jun 23, 2017 at 0:06

2 Answers 2

2

Before starting the deployment, make sure to check the deployment group to see if there is any healthy instance listed.

Sign up to request clarification or add additional context in comments.

Comments

1

2 potential reasons could be possible here :

  1. You might have missed to install the Code Deploy Agent on your EC2 instance(s) for which the below set of commands will help you to install

sudo yum update

sudo yum install aws-cli

cd /home/ec2-user

aws s3 cp s3://aws-codedeploy-us-east-1/latest/install . --region us-east-1

chmod +x ./install

sudo ./install auto

Please make sure above set of commands depend on the platform you are using, if you are using Amazon's Linux AMI its good to go, for other platforms it may vary.

  1. There might be error in your appspec.yml, if that is the case then you may be able to see that error in which lifecycle event the error is there. To identify that, go to the deployments => select one of the deployments which got failed => go to events => here you will see the error => clicking on that error will display the reason.

If you want to understand in detail how it works, kindly go through my blog here

Please let me know if it doesn't fix your problem.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.