Deploy Flask APP on AWS EC2 Instance | Flask on EC2 | Running Flask APP on AWS EC2 | AWS Demo

Sdílet
Vložit
  • čas přidán 13. 10. 2022
  • Deploy Flask APP on AWS EC2 Instance | Flask on EC2 | Running Flask APP on AWS EC2 | AWS Demo
    Hi Learner,
    In this video we will learn how to deploy Flask app on Amazon web services. We will deploy the Flask app on EC2 instance. .
    Commands and code can be found here: github.com/yeshwanthlm/YouTub...
    If you like the video please consider subscribing to the channel and hit the like button and share among your friends.
    AWS Playlist: • AWS
    Subscribe to the Channel: / amonkincloud
    Thank you. I hope this helps. If you find this video useful please Like, Share and Subscribe to the channel!
    Subscribe to the Channel: / amonkincloud
    Regards,
    A Monk in Cloud
    (amonkincloud@gmail.com)
    #AWS #LearnAWSforFree #Free #FreeResources #Top5 #2022 #AWSCommunityBuilderProgram #Community #CZcams
    #MySql #Server #AWS #EC2 #Instance #EC2_Instance #Demo #MySqlServer #Commands #Queries #LearnAWS #AWSCommunityBuilder #AWSCertified #Backup #Snapshot
    #AWS,#LearnAWSforFree,#Free,#FreeResources,#2022,#AWSCommunityBuilderProgram,#Community,#Server,#EC2,#Instance,#EC2_Instance,#Demo,#Commands,
    #LearnAWS,#AWSCommunityBuilder,#AWSCertified,#Automation,#SnapshotCreation,#AWSEC2Instance,#CompleteTutorial,#LiveDemo,#ProjectBasedLearning,
    #ClearAWSInterview,#InterviewPreparation,#OnlineLearning,#SelfThoughtLearner,#Opportunity,#DevOps,#ITCareer,#DevOpsRoles,#Jobs,#India,#AWSDevops,
    #Happy,#AWSAccount,#TrainingOnAWS,#CloudComputing,#Tutorial,#AWSDemo,#FlaskAppOnAWSEC2
  • Věda a technologie

Komentáře • 109

  • @captainofthewhitetower
    @captainofthewhitetower Před rokem +16

    I have scheduled a meeting with @amonkincloud. We solved the problem in like 5 minutes. I want to thank him for helping me out. We had a nice chat, and he is one of the sweetest people I've met. I am so glad to schedule and meet up online. I am really happy to subscribe. Much love from Turkey. Take care.

    • @amonkincloud
      @amonkincloud  Před rokem +1

      Glad that we could fix your issues @hageshiku4262 brother. Thank you for your kind words. All the best bro ❤️

  • @DarionDAnjou
    @DarionDAnjou Před měsícem +1

    absolutely phenomenal. it all works. thanks!

  • @frankruss3663
    @frankruss3663 Před rokem +1

    Nicely explained. Very useful video.

  • @faisalsulemana
    @faisalsulemana Před rokem +1

    Excellent tutorial. I will try it out.

  • @matthewsmithwarren2
    @matthewsmithwarren2 Před rokem +3

    Hi, thanks for taking the time to show this method of deploying a Flask application. I'd just figured out how to connect AWS EC2 with GitHub and was expecting something more direct. Is Flask meant to be a developer tool and not meant for production? The Werkzug redirect and Nginx reverse proxy makes me curious to better understand the typical server deployment of an app.

  • @naren06938
    @naren06938 Před rokem +5

    Sir....all of ur videos explanation is well, but with simple hello world, we can't get excitement, plsss do with some complex code (real-time application)....Means output should be some Content (website or useful web-app), not a single echo command....plsss

  • @shayakray3836
    @shayakray3836 Před 4 měsíci +1

    thank you for the great tutorial sir ! :)

  • @islamicinterestofficial
    @islamicinterestofficial Před rokem +1

    Great explanation. Thank you

  • @adityanjsg99
    @adityanjsg99 Před 4 měsíci +1

    Worked fine for me .. thanks

    • @amonkincloud
      @amonkincloud  Před 4 měsíci

      Glad that it worked
      Keep supporting 🙏

  • @youtuberhiren8963
    @youtuberhiren8963 Před 5 měsíci +1

    Thank you so much sir it helped me really lot

  • @manu1983manoj
    @manu1983manoj Před rokem +1

    great video

  • @mohammadazhar6341
    @mohammadazhar6341 Před rokem +1

    Nice explanation.....sir

  • @vagneralves3892
    @vagneralves3892 Před 2 měsíci

    Thank you Very much!!!

  • @amrsaeed9643
    @amrsaeed9643 Před 3 měsíci +1

    I hope this message finds you in good health and spirits. I wanted to express my gratitude for the valuable knowledge you have shared, which I have benefited greatly from. I have been following your work and have been impressed by it. I couldn't find a way to thank you enough except by inviting you to explore Islam. I hope to be of benefit to you as you have been to me.
    I invite you to join us in understanding Islam better, whether through conversations, attending events at the mosque, or simply exploring resources that delve into the core beliefs and practices of this faith.

    • @amonkincloud
      @amonkincloud  Před 3 měsíci

      Thank you for your kind words.
      I am wondering how tech contents on Cloud and DevOps is related to any religion? I belong to “Human” religion 😁

    • @amrsaeed9643
      @amrsaeed9643 Před 3 měsíci

      @@amonkincloud both are benefiting human life tech and religion giving you the luxury of yourself and saving time by learning from previous mistakes
      the human religion is to die be aware.

  • @codersaurabh
    @codersaurabh Před rokem +1

    When i will add new api and how to choose custom port,? Cause on http only 80 port is selected can't edit it

  • @kotraner
    @kotraner Před rokem +1

    how can I write to work with other router... I added it but it won't work

  • @allaboutastronomyy
    @allaboutastronomyy Před měsícem +1

    hey there! im totally new to cloud so every small item there freaks me out. I got a very small question. So i got a small website (my portfolio) running flask in backend and no heavy task in general, just basic routing. according to the free tier of AWS, it provides us 750 hours free per month for a year. so if i run only one instance of ec2, it'll be entirely free for the whole year. this example you're showing is running only 1 instance right? (this might be a very dumb question, but again i have no clue about cloud, sorry).
    thanks in advance

    • @amonkincloud
      @amonkincloud  Před měsícem

      Yes in this video we have used only one instance.

  • @RayyanSystems
    @RayyanSystems Před 4 dny +1

    I did everything exactly as you video explains but i am not able access it via my public i p!

  • @RahulRaj-sc8pv
    @RahulRaj-sc8pv Před rokem +1

    Sir can you please make a video on complete aws network services in details.

    • @amonkincloud
      @amonkincloud  Před rokem

      Hi Rahul, thanks for reaching out. The request has been noted and you might expect a video on this soon.
      Thanks
      A Monk in Cloud

  • @WaqasAhmad-zl3ps
    @WaqasAhmad-zl3ps Před měsícem +1

    Hi man thanks for uploading this video. My question is everything work fine but at the end when I paste IP to my browser It shows no response. can you please tell me how can I resolve this issue? my browser takes lot of time and at the end it shows : This site can’t be reached

    • @amonkincloud
      @amonkincloud  Před měsícem

      Check if you have allowed the port number on the security group

  • @kavyanagesh8304
    @kavyanagesh8304 Před 5 měsíci +1

    @amonkincloud, Thank you for such a useful video. I am facing an issue. When I try to run a flask app that renders a html page as response (uses render_template function of flask package to respond), it does not display the result of the html page. Instead, it displays the contents of the html source code as it is when I curl. The flask app is working fine when I run it in my local. Can you please help me identify where am I going wrong? Thank you!

    • @amonkincloud
      @amonkincloud  Před 5 měsíci

      Thank you.
      To check this we need to check the complete details along with the configuration

  • @himms_sharma
    @himms_sharma Před 6 měsíci +1

    Thanks for this wonderful video...
    In my case I have python based application running on the ip address and port range 8000, so when I want to host through route 53 I am getting problem because there is only ip address acceptable .... Please give me suggestion how to to i host that application

    • @amonkincloud
      @amonkincloud  Před 6 měsíci

      Thank you 🙏
      I failed to understand the exact usecase of yours

  • @abhigujjar7439
    @abhigujjar7439 Před rokem +2

    Hi , thanks for the tutorial, but how can i make a application load balancer point towards this, so i created a alb point to this it is hitting the nginx server but i am getting 404 but when i curl it gave me the response , bit alb its 404 i can see a nginx 404 page, dont where its wrong

    • @Nature-mh2rh
      @Nature-mh2rh Před 10 měsíci +1

      This is a good question. Would be great if the creator response to such questions instead of just liking it.

    • @amonkincloud
      @amonkincloud  Před 10 měsíci

      @Nature-mh2rh cannot answer without checking all the configurations.

  • @stilldigging
    @stilldigging Před rokem +1

    Bro pls reply, how to add a custom domain? Can I just add a dns A record and point it to the ip, but the public ip changes everytime, I restart, do I need to point it to the private ip? or something else..

    • @amonkincloud
      @amonkincloud  Před rokem

      You can add an EIP and have an A record for it

  • @stilldigging
    @stilldigging Před rokem +2

    Can I easily port from one instance to other? Which instance is good for a website with 100,000 traffic hits per month

    • @amonkincloud
      @amonkincloud  Před rokem

      Information regarding this can be found in the documentation published by AWS. You can find the details below 👇
      aws.amazon.com/ec2/pricing/

  • @whiteandnerdywierdal
    @whiteandnerdywierdal Před 11 měsíci +1

    Hmmm I'm getting a This site can’t be reached when I try to access the public IP. When connected to the ec2, I can hit local host and it returns hello world. What do you think could be going on?

    • @amonkincloud
      @amonkincloud  Před 11 měsíci

      Cannot point out what is the exact issue. We can troubleshoot this over a call if you okay.

    • @whatssnots
      @whatssnots Před 11 měsíci +2

      Try connect via http instead of https

  • @yathartharora5857
    @yathartharora5857 Před rokem +1

    Hey,
    I am getting "curl: (7) Failed to connect to localhost port ' error after creating the service and running sudo systemctl commands.
    Do you know what could be the reason? The gunicorn -b localhost:8080 app:app command is working fine

    • @amonkincloud
      @amonkincloud  Před rokem

      Hey Yatharth, haven’t faced this issue before.

    • @mdcapitals
      @mdcapitals Před rokem

      I am facing same issue

    • @mdcapitals
      @mdcapitals Před rokem

      In that file after
      sudo nano /etc/systemd/system/.service
      Don't forget to replace "helloworld" with

    • @aruezechukwuebuka7868
      @aruezechukwuebuka7868 Před 9 měsíci +1

      Please were you able to resolve this? If so, how did you do it?

    • @aggelo143
      @aggelo143 Před 3 dny

      If someone is facing this, check the service file for typos as well.

  • @abhigujjar7439
    @abhigujjar7439 Před rokem +2

    Hi how can i make other endpoint also working, only / root endpoint is working but any other endpoint is not working like /api/isconnected any help please? I can curl the other endpoint but cannot hit it from the ec2 public io

    • @amandas2234
      @amandas2234 Před rokem +1

      Im facing same issue. How to solve it?

    • @amandas2234
      @amandas2234 Před rokem +1

      well i need a solution not a like

    • @amonkincloud
      @amonkincloud  Před rokem

      @amandas2234 firstly I don’t have the visibility as to how you have configured it and not sure where you are facing this issue

    • @amandas2234
      @amandas2234 Před rokem

      @@amonkincloud when the route is / its showing hello world but when im changing it to a different endpoint to listen to API calls . It is showing 404 error

    • @thanujram7457
      @thanujram7457 Před 8 měsíci

      @@amandas2234 I am having the same issue and could not find a solution for it

  • @mammouth9793
    @mammouth9793 Před 5 měsíci +1

    Any idea why I can see my website using the public IPV4 DNS but not using the public ip ?

    • @amonkincloud
      @amonkincloud  Před 5 měsíci +1

      Need to be checked. AFIK public Ip and DNS both would be present

  • @emirafiq5358
    @emirafiq5358 Před 9 měsíci +1

    hi sir your tutorial is very helpful but when i paste my URL in the browser it doesnt seem to work i suspect i it has something to do with Nginx configurations because the output for the other steps were similar. could you please tell me how to troubleshoot this. thank youu

    • @emirafiq5358
      @emirafiq5358 Před 9 měsíci +1

      quick update, i doublechecked my firewall and enabled a port and it works but it cant
      route to other pages in my application

    • @amonkincloud
      @amonkincloud  Před 9 měsíci

      Glad that it helped

    • @emirafiq5358
      @emirafiq5358 Před 9 měsíci +1

      @@amonkincloud could you assist on routing to other pages sir it would be really helpful because its for my project?

  • @JayantBansal
    @JayantBansal Před rokem +1

    This all works fine, but if i update the code, the server still responses according to old code. How do i update that?

    • @amonkincloud
      @amonkincloud  Před rokem

      Remove the entire content and then try to add the new code

    • @JayantBansal
      @JayantBansal Před rokem

      @@amonkincloud what if i m testing things out...removing whole thing is too time consuming. No other way?

  • @arkodas1283
    @arkodas1283 Před 8 měsíci +1

    Can this deployment be done on windows instance instead of a unix one?

  • @mohammadazhar6341
    @mohammadazhar6341 Před rokem +1

    I have a question i have learned aws and azure ...so which devops is easy to work azure devops or AWS devops for better career in future

    • @amonkincloud
      @amonkincloud  Před rokem +1

      Hi Mohammad thanks for reaching out. If you ask me I will first learn the following tools -Terraform, Jenkins, Docker, K8s and Grafana. After learning these tools I would pick any one of the cloud platforms and learn native DevOps tools (eg: CodeBuild, CodeCommit, CodeDeploy in case of AWS and Azure DevOps in case of Azure). I am following this order. Views might be different.
      Hope this helps
      Thanks,
      A Monk in Cloud ☁️

  • @thefreeman5712
    @thefreeman5712 Před rokem +2

    hi, thanx for this helpful video..
    my homepage is working but other pages are not accessible.
    getting Error - 404 Not Found nginx/1.18.0 (Ubuntu)

    • @tushitgargg
      @tushitgargg Před 11 měsíci +1

      same man, did you find any solution?

    • @oseias3246
      @oseias3246 Před 10 měsíci +2

      just remove line "try_files $uri $uri/ =404;"

  • @shaniverma
    @shaniverma Před rokem +1

    Showing Error when hitting curl 3000 "curl: (7) Failed to connect to localhost port 3000 after 0 ms: Couldn't connect to server"

    • @amonkincloud
      @amonkincloud  Před rokem

      Please check the connection

    • @chaptures-chapladin6676
      @chaptures-chapladin6676 Před rokem

      encountered the same issue with AWS Linux 2023, what I did was manually run gunicorn on separate screen.

  • @engineerboi3234
    @engineerboi3234 Před rokem +1

    it worked but only first page is showing in my case

    • @amonkincloud
      @amonkincloud  Před rokem

      Glad that it helped you. It is just an example to show how to host flask applications. You can build on top of this.
      Thanks,
      A Monk in Cloud ☁️

  • @sunnypepple6571
    @sunnypepple6571 Před 4 měsíci +1

    Whilst using this method, I ould only access "/" main route but I couldn't access other routes in the application for example "/api/members". How can one solve this problem?

    • @amonkincloud
      @amonkincloud  Před 4 měsíci

      This is just a demo app. You need to check it further depending on your usecase

    • @sunnypepple6571
      @sunnypepple6571 Před 4 měsíci

      @@amonkincloud it's a general cade from the various tests I've had. It typically should not occur.
      Secondly, I think it's also an opportunity for you to showcase this problem on your CZcams channel.

    • @Piyush-ve3tr
      @Piyush-ve3tr Před 6 dny

      @@sunnypepple6571 Hey brother did you found solution to that problem?

  • @tanmaywani4474
    @tanmaywani4474 Před měsícem +1

    I am getting bad gateway
    nginx server

  • @ashishveer4591
    @ashishveer4591 Před 10 měsíci +1

    what about requirements.txt file

    • @amonkincloud
      @amonkincloud  Před 10 měsíci

      You can add that as well. This was just an example

    • @syedmujahid9860
      @syedmujahid9860 Před 3 měsíci

      @@amonkincloud then why are you showing such simple examples,no use of that

  • @captainofthewhitetower
    @captainofthewhitetower Před rokem +2

    I have hard time running my task definition would you be interested to help me via discord?

    • @amonkincloud
      @amonkincloud  Před rokem +1

      Sure I can help in the cloud side. If you are okay, go ahead and book a slot here: topmate.io/a_monk_in_cloud

    • @captainofthewhitetower
      @captainofthewhitetower Před rokem +1

      Monk I would be so happy, I am at my intership and I managed a lot but the task keeps stopping man

    • @amonkincloud
      @amonkincloud  Před rokem +1

      Sure

    • @captainofthewhitetower
      @captainofthewhitetower Před rokem +1

      @@amonkincloud , will you come now to live video call for 30 min ? I am in Turkey/Istanbul.

    • @captainofthewhitetower
      @captainofthewhitetower Před rokem +1

      @@amonkincloud I have booked.