PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, July 14, 2022

[FIXED] How to send a flask application to AWS Elastic Beanstalk?

 July 14, 2022     amazon-elastic-beanstalk, amazon-web-services, web-deployment     No comments   

Issue

I am trying to deploy my website to Elastic Beanstalk in the console from AWS. The website structure is working perfect locally in my computer and has this structure:

- app.py

- Static --------- css --------- style.css
                   js  --------- autocomplete.js
                                 otherfiles.js

- Templates  ----- index.html

the application app.py is an application in Flask sending the values of the variables to the index and the javascript files . I would like to make the webpage work in AWS, and, since the app.py has to be running all the time 24 hours, I have thought the best option is AWS Elastic Beanstalk. What I did was:

  • I created the environment

  • I uploaded my project in the console from AWS Elastic Beanstalk. According to what I read in other post from Stackoverflow, the best idea, is to upload the whole project on a zip file and then unzip it. I did it but all that I got is the message "Environment health has transitioned from Degraded to Severe. 100.0 % of the requests are failing with HTTP 5xx. ELB processes are not healthy on all instances. ELB health is failing or not available for all instances. Impaired services on all instances."

Does anybody know if I am heading in the right direction?

Thanks a lot


Solution

Check the beanstalk logs, you'll likely find information there that will help you determine what the problem is. I had a similar issue recently (although I was using the command line interface and not the console) and it turned out beanstalk was looking for "application.py" by default.



Answered By - awsgeek
Answer Checked By - Cary Denson (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing