AWS EB fails for Simple Flask app, logs show `ModuleNotFoundError: No module named 'application'`

0

I am attempting to deploy a flask app with AWS Elasticbeanstalk. I can get the demo to work but when I attempt the same steps with my code, it breaks. My main file is called

In the logs, I get ModuleNotFoundError: No module named 'application' and lots of [error] 3501#3501: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.3.135, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "172.31.37.25", but I am assuming the latter is because of the former. When SSH into the box and go to /var/app/current I can see other files of mine are there, but application.py is not.

To deploy, like I said, I am following the AWS demo which is basically just eb create <name>. The only other major things different between mine and the demo is I actually have a templates folder and mode code, but I do not see how that would make a difference. I have not been able to find anything that would indicate I need to do something different with deployment and creation. Also, there is a similar question here, but my application.py is already in the root. Any help would be greatly appreciated.

bp32795
preguntada hace un año58 visualizaciones
No hay respuestas

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas