code deploy agent의 사용자, 그룹명이 appspec.yml
에 작성한 것과 달라서 발생한 문제였다.문제를 해결하는 방법은AWS 공식문서에서 알려주고 있었다.
sudo service codedeploy-agent stop
sudo sed -i 's/""/"ubuntu"/g' /etc/init.d/codedeploy-agent
sudo systemctl daemon-reload
sudo chown ubuntu:ubuntu -R /opt/codedeploy-agent/
sudo chown ubuntu:ubuntu -R /var/log/aws/
sudo service codedeploy-agent start
sudo service codedeploy-agent status