Code Deploy Failure

0

I'm trying to deploy an application using Pipeline, but the deployment is failing every time. I have granted the permissions, and the agent is also running in the EC2 instance, but I'm getting this error each time "CodeDeploy agent was not able to receive the lifecycle event. Check the CodeDeploy agent logs on your host and make sure the agent is running and can connect to the CodeDeploy server."

Manju
gefragt vor 10 Monaten266 Aufrufe
2 Antworten
0

Hello.
If you check the log of the CodeDeploy agent, you will see an error output.
Would it be possible for you to share that error with us?
https://docs.aws.amazon.com/codedeploy/latest/userguide/deployments-view-logs.html

profile picture
EXPERTE
beantwortet vor 10 Monaten
0

The error you are seeing is quite common and usually IAM permissions use to be the cause but there can be other reasons as well.

Can you make sure of following:

  1. Make sure Instance Profile (role) attached to my EC2.
  2. EC2 instance should have AmazonEC2RoleforAWSCodeDeploy.
  3. CodeDeploy should have CodeDeployRole.
  4. If you are using the deployment group, then does that deployment group has this EC2 machine?

Did you check the agent log, if you see anything there that could give more details.

Additional reference:

Deployment troubleshooting guide

How to view deployment logs

Hope you find this information helpful.

Comment here if you have additional questions, happy to help.

Abhishek

profile pictureAWS
EXPERTE
beantwortet vor 10 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen