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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With