Django on Amazon Web Service (AWS)


I have read these tutorials : and

I use Django 1.8.2 and it seems that the amazon’s doc is a little bit outdated (they still used instead of django-admin), and some parts of it are not working (when stuff does not work, i fallback to the realpython link one).

So, I got it all working except my admin page does not load the static files. So, the css file is not loaded.

This is my :

i have also tried to use :

but it still does not work.

this is my eb config file :

I used eb deploy command after making the changes.

Is there extra steps that I need to do ? I have read in here : Default Django 1.5 admin css not working that i need to change alias, but it is for apache.

I also read from django doc files such as but im not sure of what to put in the STATIC_ROOT for AWS

any help is much appreciated. Thanks


It turns out “aws:elasticbeanstalk:container:python:staticfiles” maps files in your directory on your EC2 instance (/opt/python/current/app/static/) to /static/

setting STATIC_ROOT in to os.path.join(BASE_DIR, ‘..’,’static’) fixed the issue

Leave a Reply