I try to set a Flask application in AWS EB and I am running on this issue on the Log.
Failed to find attribute 'application' in 'app'.
My application is using Application factory, so the init are set in the function.
def create_app(config_name):
app = Flask(__name__)
from .api.routes import api
app.register_blueprint(api, url_prefix="/api/v1")
from .main import main
app.register_blueprint(main)
app.run()
return app
I have changed the WSGIPath to match my application name and object:
aws:elasticbeanstalk:container:python:
NumProcesses: '1'
NumThreads: '15'
WSGIPath: app
My application structure looks like this:
__init__.py(empty)
app.py
main.py
requirements.txt
api/
__init___.py (empty)
routes.py
What am I missing ? I am feeling so close and so far away at the same time.
Thanks for your help.