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
질문됨 일 년 전58회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠