I am new to Elastic Beanstalk, trying to serve a Node.js Express app and utilize serving our static files separately with Nginx. None of the tutorials I\'ve come across are
Kashif Zaidi's answer works well, but if you want to keep the setting consistent across multiple deployments, you can make a .ebextensions directory at the project root with some file like 01_environment_settings.config that specifies that setting like so:
option_settings:
aws:elasticbeanstalk:container:nodejs:staticfiles:
"/assets": "/static/assets"
You can specify multiple static file settings, for example:
option_settings:
aws:elasticbeanstalk:container:nodejs:staticfiles:
"/app/": "frontend_build/"
"/static/": "frontend_build/static/"
"/backend_static": "static/"