AWS Code Deploy Error on Before Install Cannot Solve


So I am attempting to setup CodeDeploy for my application and I keep getting an error during the BeforeInstall part of the deployment. Below is the error.

I assumed this meant the YAML file was in the wrong place. However it is in the root directory of my revision. I have tried using a simple AppSpec file like so instead of a more complex one.

More or less since this is a first deployment I want it to add all files in the revision to the public directory on the web server.

I am tearing my hair out over this and I feel it is a simple issue. I have the IAM policies and roles correct and I have CodeDeploy setup and running on my instance I am trying to deploy to.


It seems to think you had a successful deploy at some point.

Go into /opt/codedeploy-agent/deployment-root/deployment-instructions/ and delete all the files in there. Then it won’t look for this last deploy.

Leave a Reply