Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying Django to AWS - WSGIPath refers to a file that does not exist

I've been struggling with getting Django and AWS to work together. I'm following the tutorial here:

https://realpython.com/blog/python/deploying-a-django-app-to-aws-elastic-beanstalk/

I've been following all the tutorial steps, including using the "eb option" command to change the WSGIPath, but I keep getting the error:

"ERROR: Your WSGIPath refers to a file that does not exist."

As far as I can tell I've been doing everything exactly according to the tutorial.

The relevant part of my config file looks like this:

NumProcesses: '1'
NumThreads: '15'
StaticFiles: /static/=static/
WSGIPath: iotd/iotd/wsgi.py

What am I doing wrong?

like image 946
rcca Avatar asked Apr 01 '15 16:04

rcca


2 Answers

Using eb :

eb config

Go to aws:elasticbeanstalk:container:python: and change WSGIPath from:

application.py

to

mysite/wsgi.py

With "mysite" being your application name ofcourse

like image 200
Josh Avatar answered Sep 19 '22 22:09

Josh


One thing I found when I encountered this error, is that if your repository is a git repository your .ebextensions folder must be tracked and committed otherwise it will not be picked up properly on eb deploy.

like image 44
ayelder Avatar answered Sep 22 '22 22:09

ayelder