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
已提問 1 年前檢視次數 58 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南