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
asked 9 months ago259 views
2 Answers
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
EXPERT
answered 9 months ago
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
EXPERT
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions