I had the same issue. I followed this process and it did helped me.
The ApplicationStop
hook is being called from the previously installed deployment before trying to run the current deployment appspec.yml
file.
In order to prevent this from happening you'll have to remove any previously installed deployment from the server.
- Stop the code deploy agent -
sudo service codedeploy-agent stop
- clear all deployments under
/opt/codedeploy-agent/deployment-root
- Restart the code deploy agent -
sudo service codedeploy-agent start
copied ans from here so don't have to open new link.
Thanks @paul