For those who like we got exactly the same error when trying to deploy a Flask (Dash) application on AWS elastic beanstalk - you need to set the WSGIPath in Configuration/Updates, monitoring, and logging to application:server
.
The filename in my case is application.py
and definitions in code are:
application=dash.Dash(__name__)
server=application.server