Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are AWS CodeDeploy Deployment logs found?

I can see the logs in the AWS Console under Codedeploy, when I select the deployment and then click choose events, but they appear to be truncated. If I SSH into the instance, where are those codedeploy deployment logs located?

I see logs in /var/log/aws/codedeploy-agent, but the logs there don't match what's in CodeDeploy.

I'm running on Amazon Linux.

like image 832
CamHart Avatar asked Jun 27 '16 18:06

CamHart


People also ask

Where are CodeDeploy logs stored?

The folder on the instance where log files related to CodeDeploy agent operations are stored. The default setting is '/var/log/aws/codedeploy-agent' for Amazon Linux, Ubuntu Server, and RHEL instances and C:\ProgramData\Amazon\CodeDeploy\log for Windows Server instances. :pid_dir: The folder where codedeploy-agent.

Where is code deploy log in AWS?

Go to the CloudWatch console, and choose Logs. To view the CodeDeploy agent log, choose codedeploy-agent-logs. To view the deployment scripts log, choose codedeploy-deployment-logs. To view the CodeDeploy agent updater log, choose codedeploy-updater-logs.


1 Answers

I've figured it out. The deployment logs are found in:

/opt/codedeploy-agent/deployment-root/deployment-logs/codedeploy-agent-deployments.log

Each deployment also keeps it's logs in:

/opt/codedeploy-agent/deployment-root/88f9d1cf-4ee4-4b0c-9458-b1d41b8d4b48/d-TTUV9E8BG/logs/script.log where 88f9d1cf-4ee4-4b0c-9458-b1d41b8d4b48/d-TTUV9E8BG is different for each deployment.

On windows this appears to be:

C:\ProgramData\Amazon\CodeDeploy<DEPLOYMENT-GROUP-ID><DEPLOYMENT-ID>\logs\scripts.log

Source: https://github.com/aws/aws-codedeploy-agent/issues/8

like image 187
CamHart Avatar answered Sep 26 '22 06:09

CamHart