AWS EB Flask does not recognize static files AWS EB Flask does not recognize static files flask flask

AWS EB Flask does not recognize static files


Looks like you need to change the path mapping to:"/static/": "app/static/"

This mapping maps the virtual (what you refer in your html) to the directory structure. Since you have changed the dirs, now you need to change the mapping too.

Alternatively you can do the same conf in the AWS Beanstalk web console as well. Need not do in the configuration files.


This seems to be the most recent incarnation of this question and I figured I'd chime in since this just killed me for hours trying to figure out what the heck was wrong because my configuration settings were fine and the error logs and request logs didn't show any problems. I finally opened the developer console and saw I was getting an ERR_BLOCKED_BY_CLIENT for all of my static assets. Ghostery apparently treats elastic beanstalk as a cross-domain analytics tracker, so yet another gotcha that probably needs to be documented somewhere. It's simple enough to turn that off on my end, but I'm only running a site for fun. I'm not sure what you would do if you try to deploy an actual product to elastic beanstalk and Ghostery blocks all of your static assets. Your clients are probably just going to think your site sucks and won't think to look. I guess you better bundle it all directly or use a CDN.