aws code deploy: No such file or directory - appspec.yml

4k views Asked by At

When trying to deploy my rails app through code deploy I get the following error message:

No such file or directory - /opt/codedeploy-agent/deployment-root/b3ff73b4-aa93-4e49-99e4-c26cdcf7a6f0/d-06LE313R9/deployment-archive/appspec.yml

on a "BeforeInstall" error.

I have appspec.yml in my rails app root directory (e.g it is myapp/appspec.yml), and have no idea how to put the appspec file into the deployment-archive directory.

1

There are 1 answers

2
Jonathan Turpie On BEST ANSWER

The appspec.yml file should be at the root of the archive you upload to S3 or the GitHub repo you are deploying with. Try moving your appspec up one directory.

\
|-- appspec.yml
`-- myapp
    `--- (the rest of your rails app source tree)

Note that the appspec mostly uses paths relative to the archive root, so you might have to adjust them if you move your appspec.

Alternatively, you can create your bundle from inside your myapp directory so that the appspec.yml is still in the root directory of your archive.