Internal Server Error: Dash on Flask on AWS Elastic Beanstalk Internal Server Error: Dash on Flask on AWS Elastic Beanstalk flask flask

Internal Server Error: Dash on Flask on AWS Elastic Beanstalk


I think the issue is that the application.run_server(debug=True) method has localhost as a default host. This means that the app is deployed to 127.0.0.1 and you can access it only from the inside of the machine where it's running. This explains why you could only access the app locally (whether it was from your computer or inside the instance). When deploying to Elastic Beanstalk you need to specify host as 0.0.0.0 - all IP addresses (deploying with debug=True in production is discouraged!):

if __name__ == '__main__':    app.run_server(host="0.0.0.0")

Check this GitHub sample Flask app Beanstalk deployment.


I think there is a confusion with the name" application"this worked for me:application = flask.Flask(name)

app = dash.Dash(__name__, external_stylesheets=external_stylesheets,server=application)