Search code examples
amazon-web-servicesaws-code-deploy

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.


Solution

  • 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 its 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