반응형

CodeDeploy 배포시 나오는 에러마다 해결법을 정리해볼 예정이다.

다양한 경험은 좋으나, 이미 누군가 해당 경험을 공유해준다면 더 빠르게 해결 할 수 있지 않을까..?

 

코드디플로이는 친절하다.. 

배포가 제대로 동작하지 않으면 이유를 알려준다.

"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."

짧게영어지식으로 해석을 해보자면, CodeDeploy에서 이벤트 주기가 가능하지 않으니, 배포하는 서버의 log를 보라는것 같다.

 

CodeDeploy 로그 위치

먼저 필자의 서버는 우분투를 기준으로 하여 다른 OS와 위치기 다를 수 있음을 전한다.

 

경로 : var/log/aws/codedeploy-agent/codedeploy-agent.log

 

CodeDeploy 에러 목록

1. Missing credentials

에러 메시지 : InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Missing credentials - please check if this instance was started with an IAM instance profile

 

해당 에러가 발생하게 된 원인은 아래와 같다.

1.  IAM 역할을 지정하지 않고 인스턴스를 실행시킨다.

2. 이후 실행시킨 인스턴스에 CodeDeploy Agent를 설치 한다.

3. 이때 설치된 CodeDeploy에는 해당 역할을 실행 할 수 있는 자격증명이 없기에 위와 같은 에러가 발생 하는 것 입니다.

 

해결법

CodeDeploy Agent를 다시 실행 시키면 됩니다.

sudo service codedeploy-agent restart

 


에러가 더이상 나타나지 않으면 좋겠따. 처음이자 마지막으로 글 쓰고 수정을 안했으면 좋겠다.

 

참고

- https://stackoverflow.com/questions/41997426/instanceagentpluginscodedeployplugincommandpoller-missing-credentials

 

728x90
반응형
개발자 쓔쓔