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ビュー
回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ