Exclude directories from elastic beanstalk deploy
amazon-elastic-beanstalk, amazon-web-services, git
Solution
With the current `eb cli v3.x` elastic beanstalk supports the `.ebignore` file. It follows the same format as a `.gitignore` file and it replaces it on deploy.
If you want to use `.ebignore` then you need to copy your `.gitignore` into the file and then add the extra exclusions to the file. If you edit your `.gitignore` file in the future you will need to replicate any changes into you `.ebignore` file.
See elastic beanstalk docs for more details
Problem
I have some directories that I would like to be in my local git repository, but NOT in the remote repository when I deploy to my beanstalk environment. I have googled a bit, and found a few years old posts like this: http://blog.beanstalkapp.com/post/38164899272/patterns-for-excluded-deployment-paths that explain that there is this option somewhere, but I have looked everywhere and cannot find it. I think it must still be there and possibly it's been moved around? If that helps (though it probably doesn't make any difference), I've got an environment based on the sample node.js application. Where is this option? Is it possible to do it in a config file in the .ebextensions folder instead?