Setting up Django on AWS Elastic Beanstalk: WSGIPath not found Setting up Django on AWS Elastic Beanstalk: WSGIPath not found django django

Setting up Django on AWS Elastic Beanstalk: WSGIPath not found


From https://forums.aws.amazon.com/thread.jspa?messageID=396656&#396656

The ".ebextensions" directory must be in the root level directory of your application, but from the log output, the directory is instead in the "mysite/.ebextensions" directory. So for example, after following the django tutorial in the docs when you run "git aws.push" your root directory would look like this:

.├── .ebextensions│   └── python.config├── .elasticbeanstalk│   ├── config├── .git├── .gitignore├── manage.py├── mysite│   ├── __init__.py│   ├── settings.py│   ├── urls.py│   └── wsgi.py└── requirements.txt

Instead of this:

.└── mysite    ├── .ebextensions    ├── .elasticbeanstalk    ├── .git    ├── .gitignore    ├── manage.py    ├── mysite    └── requirements.txt


Find .elasticbeanstalk/optionsettings.your-app-name in your app's root directory. Search for WSGIPath and make sure it's the path you intend. It looks like it defaults to application.py.


I had the same problem ("Your WSGIPath refers to a file that does not exist"), and finally found a solution:

Note: At first, I was searching in the wrong direction, because EB was also showing this message: Error occurred during build: Command 01_migrate failed.. So I though the files, including the *.config, were correctly located.