CodeDeploy: Script at specified location: scripts/stop_server run as user root failed with exit code 1

Question:

No matter what I put inside the stop_server file the CodeDeploy ends up with the error as above.
I even commented out all the lines to simplify debugging, so now it looks inside like this

My appspec.yml:

Any sugestions highly appreciated!

Answer:

When you do a deployment, it will actually use the ApplicationStop from your last successful deployment, not your current deployment. I resolved the problem by deleting the application that I have problem with and creating a new one.

Leave a Reply