How do I configure the name of my WSGI application on AWS Elastic Beanstalk?

While the WSGIPath can be configured. Beanstalk still expects the app variable to be named as 'application'.

A simple workaround for small single file python apps can be

from flask import Flask

app = Flask(__name__)
application = app # For beanstalk

You can keep the rest of the code as is. You just need to add that single line application = app


mod_wsgi expects variable called application. Try to do something like this

from example import app as application

Note: don't do application.run(). It is not needed.