How to deploy structured Flask app on AWS elastic beanstalk


After successfully deploying a test app using the steps outlined here:

I tried to deploy my actual flask application which has the following structure:

Where contains my url mappings.

I have tried initializing the eb instance in the root directory as well as within the myApp module and git aws.push but I get the following error on the AWS dashboard:
ERROR Your WSGIPath refers to a file that does not exist. and the application does not work (404 for any path).

How can I deploy the above Flask application to elastic beanstalk?


Add the following to .ebextensions/<env-name>.config:


If you don’t have .ebextensions directory, please create one for the project. You can find more information of what can be done regarding the container configuration in Customizing and Configuring AWS Elastic Beanstalk Environments guide.

Leave a Reply