Where are CodeDeploy logs?
10 May 2025
Where are CodeDeploy logs?
Default location for CodeDeploy logs on Amazon Linux is:
/opt/codedeploy-agent/deployment-root/...
# or maybe :
/var/log/aws/codedeploy-agent/...
# depends on what are you looking for
- I repitedly google it tooo many times
Tailing agent logs is very useful for debugging codedeploy-agent issues
tail /var/log/aws/codedeploy-agent/codedeploy-agent.log -f
- Sometimes it is the only way to find out why deployment fails
Cleanup codedeploy-agent cache
cd /opt/codedeploy-agent/deployment-root/
rm -rf *
watch -n 1 "ls -R /opt/codedeploy-agent/deployment-root/"
- Remove all agent cache, start new deployment, and watch filestructure update