Easily Deploy Full Stack Node.js Apps on AWS EC2 | Step-by-Step Tutorial

Поделиться
HTML-код
  • Опубликовано: 24 ноя 2024

Комментарии • 210

  • @nasrularif9570
    @nasrularif9570 9 месяцев назад +139

    Finally a video from A to Z... Most video of AWS tutorial I found start from Y to Z...

  • @TimothyHuey
    @TimothyHuey 7 месяцев назад +27

    Your video was very well done. I was able to deploy a nodejs webapp on my first attempt. Your 30 minute video took me about 7 hours to complete and I was filled with dread when you said at the end that you had a short 7 minute video explaining how to buy a domain name. I knew that was gonna take me 30 mins to an hour. But time is not an issue, understanding is, when it's your first time. I invested the time to thoroughly understand your instructions and deploy the app. It went off well and my app is up now and ready to be tested by users. Well done!!!!

    • @hen56349
      @hen56349 3 месяца назад

      Your comment actually motivated me to spend more time to understand everything in depth. I have also spent 10+ hours on this. Thank You.

  • @and_ppv
    @and_ppv 10 месяцев назад +35

    Stumbled upon the video, and watched the whole thing - at normal speed and rewinding along the way. Great material

  • @ScriptCodec
    @ScriptCodec 9 месяцев назад +8

    Ive been waiting all my life to understand what my boss had me do my computer via Google cloud run 😅. This is a hrll of a revision. thanks man.

  • @tuscala
    @tuscala 10 месяцев назад +20

    Man, this is the greatest tutorial video that I've ever seen!

  • @tonyeder4333
    @tonyeder4333 9 дней назад

    Like so many before me, THIS VIDEO MADE IT ALL HAPPEN! I had a slightly different stack going into it but this video covered key points I needed to deploy my first application through AWS. Thank you Sam!

  • @ApeToot
    @ApeToot 6 месяцев назад +6

    Got my first "Full Stack" data analysis app up with this video. You helped connect a lot of dots that were not connected by amazons documentation. Thanks!

    • @SamMeechWard
      @SamMeechWard  6 месяцев назад +1

      Glad it helped 🤗

    • @ApeToot
      @ApeToot 4 месяца назад

      @@SamMeechWard It’s been 2 months and i’m starting a company in silicon valley with Azure as a platform you inspired me and we are getting our first investment august 1st and it’s going so well

  • @EzMoney_Treez
    @EzMoney_Treez 8 месяцев назад +5

    this is exactly what I was looking for. After taking notes I am excited to practice this many times to ensure foundational knowledge. Awesome stuff!!

  • @daudsweetland1880
    @daudsweetland1880 5 месяцев назад +1

    Really useful and impressive content - I used it to setup an EC2 instance for the first time ever, get my NodeJS Express GraphQL server installed and connecting to a PostGres DB (also on AWS - so skipped the part about installing locally) get the systemctl stuff done, and Paddy for SSL only connection to my server. Took me a few hours, and rewinds to get everything done, but all working fine now!
    Thank you VERY much!!!!

  • @bigbadcatbigbcy2933
    @bigbadcatbigbcy2933 7 месяцев назад +1

    Thank yo so much for this tutorial. This is the only working tutorial in the internet and explains everything so good and it only takes 28 minutes

  • @devaa7076
    @devaa7076 10 месяцев назад +4

    Woahhh...Woahhhh. What a great tutorial sir!. I was thinking to learn how to host a server in cloud and what is ssh what is reverse proxy how to map domain name to our server...like man i got all the answers in a single 30min video. Thank you so much for producing these high quality videos and keep on doing em! Hats-off.

  • @khantseithu
    @khantseithu 4 месяца назад +1

    bro doesn't waste a second! quality tutorial

  • @hamzamalik248
    @hamzamalik248 3 месяца назад

    Just straight to the point, no nonsense. Best video ever, that covers everything.

  • @selimhamzaogullar7484
    @selimhamzaogullar7484 12 дней назад

    You are amazing. The most detailed explanation I have ever seen. Thank you so much.

  • @georgemwaniki
    @georgemwaniki 6 месяцев назад

    Your way you explain things makes you one of the best tutor i know, Thank you so much

  • @Charith_LakshanJ
    @Charith_LakshanJ 10 месяцев назад +47

    this might be a dumb question. instead of copying your files from the local machine to the remote machine. you can install git on ec2 and pull from repo ?

    • @khaledsanny4817
      @khaledsanny4817 10 месяцев назад +13

      Yeah but it's too much hassle just for this video. You will have to create and delete the repo

    • @israelafangideh
      @israelafangideh 10 месяцев назад +4

      Yes, you can

    • @snakefinn
      @snakefinn 9 месяцев назад +7

      I imagine that there will be some files that won't be located on the repo you may want to copy over. For example .env files

    • @austinm8823
      @austinm8823 7 месяцев назад +1

      ​@snakefinn but he didn't copy over the .env files using rsync either lol.

    • @switchlyrics.
      @switchlyrics. 7 месяцев назад +1

      imagine u lose ur git account

  • @astronautonmars
    @astronautonmars 10 месяцев назад +3

    Your videos are always straightforward and I absolutely love them 🥰

  • @michaelzinzun-zu1py
    @michaelzinzun-zu1py 6 месяцев назад

    I've been looking for straight forward instructions for months. Thanks to you My site is hosted. Still need to figure out how to install and configure a MongDB database

  • @guranshvirgill4995
    @guranshvirgill4995 4 месяца назад

    Hands the best video on AWS on the internet.

  • @FunnyVideos-ni4iu
    @FunnyVideos-ni4iu 2 месяца назад

    Thank you so much! Your video helped me setup a client webapp with ease. You teach so well! Much gratitude to you brother

  • @HishamElmorsi
    @HishamElmorsi 7 месяцев назад

    Thanks so much, your way of teaching makes things simpler. Waiting for more videos 💫

  • @yanfung9081
    @yanfung9081 10 месяцев назад +1

    You always deliver an amazing RUclips tutorial for the viewers! Your explanations are always spot on! Thank you so much!!! :)

  • @AdarshMadrecha
    @AdarshMadrecha 7 месяцев назад +1

    Can you do a follow-up video, just covering changes required if using Bun instead of Node Js?

  • @shafthinks
    @shafthinks 3 месяца назад

    This is the finest tutorial I have ever seen. Thanks man!!

  • @AlfredoGuako
    @AlfredoGuako 8 месяцев назад

    this was incredibly helpful, got my first custom domain web app running!

  • @noahmilliken4259
    @noahmilliken4259 10 месяцев назад +2

    can anyone explain to me how the server file and the react app both run? I am having a lot of troulble starting my vite app in the front end directory and the server from the systemD command?

  • @veronicasoloduha3009
    @veronicasoloduha3009 5 дней назад

    Thank you so much, it was very clear and interesting. Appreciate your work

  • @kiranmantha928
    @kiranmantha928 Месяц назад

    Great vid. looking forward for your next video on deploying the same using ecs and eks

  • @abpdev
    @abpdev 3 месяца назад

    Great video. I would highly recommend AWS CDK or terraform.

  • @KehindeAdamo
    @KehindeAdamo 2 месяца назад

    this is the exact and perfect aws tutorial have been longing for thanks sam meech-ward

  • @guilhermeviana8543
    @guilhermeviana8543 4 месяца назад

    Thank you, you explained in a simple and understandable way!

  • @bradleyandrewercole6349
    @bradleyandrewercole6349 3 месяца назад

    Thanks man your video is very helpful for my college ✨✨, You deserve more attention 🔥🔥

  • @darlinmanuelcasadoperez1092
    @darlinmanuelcasadoperez1092 2 месяца назад

    Great tutorial, very well explained, easy to follow and fun to watch. greeting from DR.

  • @marvellousadesanya8480
    @marvellousadesanya8480 9 месяцев назад +3

    Any alternatives o rysnc? Does not work on git bash

  • @hamidkordasti6298
    @hamidkordasti6298 5 месяцев назад

    Perfect .. pace and content are magically effective. Thanks

  • @jesseajioh1074
    @jesseajioh1074 23 дня назад

    I love watching people setup servers from scratch like this. Can i actually do it? Hell naw😂. Would I do it if i could? Maybe, so I'm saving this one for future reference. Awesome video

  • @pranjalgupta659
    @pranjalgupta659 8 дней назад

    I had an express app that I deployed on AWS using this video tutorial. I am able to make a CURL request to this but the request using postman yields the error as "Request time out" what might be the issue ?

  • @AddictedGamerr
    @AddictedGamerr 4 месяца назад +2

    is it good for production app to use Postgres installed in ec2 than RDS Postgres

  • @jessechou9397
    @jessechou9397 4 месяца назад

    Great, great video - loved the explanation with each step too.

  • @bigdinorino
    @bigdinorino 9 месяцев назад +4

    at 9:56 how do you go to my app git(main)

  • @SomaStudios
    @SomaStudios 3 месяца назад

    Fantastic video. Thanks for the clear explanations!

  • @panzonecadutodifaccia
    @panzonecadutodifaccia 3 месяца назад

    quick question, since you have a git repository in the local machine, why did you pull that one inside the app folder instead of transfering the files via terminal?

  • @Jeremiahking101
    @Jeremiahking101 8 месяцев назад +2

    I have an App.js running on port 3000 and a Server.js (Backend) running on port 5000. How would this work?

    • @kincaidschmitt7811
      @kincaidschmitt7811 8 месяцев назад

      +1

    • @vikneswaran6186
      @vikneswaran6186 6 месяцев назад

      I am assuming that you are having your app.js using server.js files , so that eventually it is able to connect to it how it connect on local computer , because you could see that it is still now being running on local host 3000 so that would be able to access the 5000 port server running on it .

  • @Beyram1501
    @Beyram1501 9 месяцев назад

    Man your videos are amazing and really clear. you gained a subscriber. Thanks

  • @elitdesign3867
    @elitdesign3867 10 месяцев назад +1

    Awesome job! thank you. What about MongoDB and nginx, I hope you explain that someday. Another question, please: How can I get the client's IP (remote ip)?

  • @HenryOsim
    @HenryOsim 10 месяцев назад +3

    great video thanks. Can you create a video about doing same with Terraform please?

    • @SamMeechWard
      @SamMeechWard  10 месяцев назад

      Thank you. That's a bit more of a challenge because terraform isn't really used for single instance configuration. You would end up using something like packer to create an ec2 image of the node app, then use terraform to create a new instance based on the image. Terraform is used for immutable infrastructure, which this is not. However, I do have a series of videos on how to use terraform and packer for this kind of stuff, but you'd end up with many ec2 instances instead of just one.

  • @erlend1587
    @erlend1587 10 месяцев назад

    Great tutorial! I did something similar using Linode, but used nginx instead of Caddy. Caddy seem like a simpler choice with the automated ssl.

    • @SamMeechWard
      @SamMeechWard  10 месяцев назад +1

      I only recently started using it, but it's been awesome and I trust the community behind it

  • @fathismael
    @fathismael 2 месяца назад

    Hello, my app is running in a docker container inside ec2. Can i do the same thing with an app running inside docker container ? I purchased a domain name from Namecheap, i installed caddy and i did everything you are showing us in this tutorial but i'm getting an error saying : "This site cannot provide a secure connection" and with error type : "ERR_SSL_PROTOCOL_ERROR" in Chrome and Edge and "SSL_ERROR_INTERNAL_ERROR_ALERT" in Firefox

  • @rangaswamireddy8683
    @rangaswamireddy8683 10 месяцев назад

    Fantastic the way you explained. And i request you make a tutorial on pm2 load balancer etc... thanks

  • @ismailabouamal2703
    @ismailabouamal2703 2 месяца назад

    Amazing! Thanks a lot, this is extremely helpful.

  • @r1shabhnegi
    @r1shabhnegi 4 месяца назад

    Thanks Sam, you are genius.

  • @ecko3383
    @ecko3383 8 месяцев назад

    You are incredible kind sir. Thank you for this

  • @vivienneobrien4852
    @vivienneobrien4852 2 месяца назад

    curious - why dont you have your frontend in client and backend wrapped in a server folder with the package.json etc in the root app? just seems a little odd to have the backend spread out like that then a frontend folder inside of it all

  • @mathiramilo
    @mathiramilo 4 месяца назад

    Hi, amazing video! Quick question, can I setup SSL with the Public IPv4 DNS that AWS EC2 provides me?

  • @anjanshomodder6463
    @anjanshomodder6463 9 месяцев назад

    Really helpful video. Would be nice if you could create a video about how to automate all these stuff with github actions. Thanks

  • @alxbanana
    @alxbanana 3 месяца назад

    Great video man! I just found your channel and saw 2 and were amazing. Will try and replicate that with a local project I have.
    Hopefully you will do some terraform and ansible too, if you haven’t done already 😅

  • @aidanpatrickkane
    @aidanpatrickkane 5 месяцев назад

    Awesome video! So from here, where do we go if we want to know how to let our applications scale?

  • @samm9435
    @samm9435 25 дней назад

    great tutorial but I keep getting stuck at the run build step. It just gets stuck at creating an optimized production build every time

  • @divyaratnasami3757
    @divyaratnasami3757 4 месяца назад +1

    Can you clone your repo by installing git on the ec2 instance?

  • @thequang9234
    @thequang9234 10 месяцев назад

    top notch content Sam! Would you care to explain what you meant by 'I have a migration system on my app". Why did you have to run npm run migrate? Thanks!

  • @armaandhanji7151
    @armaandhanji7151 10 месяцев назад +2

    Fantastic walkthrough!

  • @andreabiaggi3198
    @andreabiaggi3198 10 месяцев назад +2

    Awesome job! Would be great to see how to move from this infrastructure to one more scalable, with a dedicated RDS instance, a load balancer and maybe different ec2 instances for different microservices, maybe using terraform. But as you said this is foundational and it's very well done!

    • @4Funzzies
      @4Funzzies 4 месяца назад

      Would be the ultimate video!

  • @dianab536
    @dianab536 5 месяцев назад

    Can you please make video setting up Nginx to Nextjs? Definitely an insightful video, thank you for introducing me to caddy. 😊

  • @1111ah
    @1111ah 2 месяца назад

    Such a great video. Thanks!

  • @stefanypc1333
    @stefanypc1333 4 дня назад

    Is the code used in this example available? I can't open the GitHub link

  • @Benjaminmcp0
    @Benjaminmcp0 6 месяцев назад

    Hi I'm new to AWS cloud computing, could you explain why you used EC2 rather than AWS amplify in this instance :)

  • @mohammedhamza5242
    @mohammedhamza5242 4 месяца назад

    I am getting an error in windows that rsync command not found!!
    Any help will be appreciated. Thanks.

  • @ojcgv21
    @ojcgv21 3 месяца назад

    eaxctly what I need, greate video!

  • @larrymckuydee5058
    @larrymckuydee5058 24 дня назад

    Mind to know why can’t we start the app on port 80 and skip reverse proxy?

  • @leanderchristmann2981
    @leanderchristmann2981 9 месяцев назад +2

    Note on 19:18 that if you installed Node.js differently, like via the NVM Node Version Manager, you have to set different ExecStart path in the .service file - or else you'll receive an error "Active: failed [...] Process: .... ExecStart=/usr/bin/node index.js (code=exited, status=203/EXEC)" when doing "sudo systemctl status myapp.service".

  • @fahadahad2815
    @fahadahad2815 6 месяцев назад

    hey i am unable to copy my folder from windows to ubuntu. I got the public key and invalid hostname error. Any solution?

  • @ffcorona9856
    @ffcorona9856 3 месяца назад

    Very Helpful. But can we Run Multiple Node Js Application at a time ?

  • @amansagar4948
    @amansagar4948 7 месяцев назад +2

    12:32 i clicked the "open address" from AWS console rather than copying the address so it was opening the app in https not http and i was unable to access it. I was stuck on this for a day

    • @alifakhoury1958
      @alifakhoury1958 Месяц назад +1

      Dude I've been stuck on this since yesterday and trying everything to fix it. So glad I ran into your comment :p thanks!

    • @amansagar4948
      @amansagar4948 Месяц назад

      @@alifakhoury1958 haha same same

  • @ahmedsalman1782
    @ahmedsalman1782 5 дней назад

    Amazing content, Thank you ❤

  • @jcarneiro91
    @jcarneiro91 6 месяцев назад

    if i already have a .env on my project directory to be consumed by my node app I still have to do the env variables part for systemd ?

  • @jitxhere
    @jitxhere 10 месяцев назад +1

    Wow this is good. I have questions and suggestion.
    Does that systemd replaces the use of pm2? Why didn't you use pm2
    Suggestion: Moving forward with this with setting up basic testing and CI CD.

    • @KratosCY
      @KratosCY 8 месяцев назад

      Good question and suggestion.

    • @jitxhere
      @jitxhere 8 месяцев назад

      I am currently using pm2...For CI CD I found this ruclips.net/video/fkzpywlJcMA/видео.html@@KratosCY

  • @youssouf.abachouch
    @youssouf.abachouch 6 месяцев назад

    the best tutorial, thank you so much

  • @MilindMishra
    @MilindMishra 10 месяцев назад

    quick question can we not add our git credentials to the server and then use them to pull changes and deploy from the server or if that is not a standard practice ?

  • @DheerajKumar-ik4mi
    @DheerajKumar-ik4mi 8 месяцев назад

    Have you put the frontend requests to localhost or a specific IP?

  • @richardbray
    @richardbray 5 месяцев назад

    This was really good. I leant a lot 👍

  • @dekooks1543
    @dekooks1543 10 месяцев назад

    banging video mate ! Do you mind if I ask what software you use to edit your videos ? The transitions and zoom effects are top class

    • @SamMeechWard
      @SamMeechWard  10 месяцев назад

      I use a few different pieces of software, but my main video editing is done in Camtasia. It's pretty easy to use and all the basics are covered in their intro 45 minute video: ruclips.net/video/AE1Hfy-yw4s/видео.html

  • @DanielSumah-y9e
    @DanielSumah-y9e Месяц назад

    Is it good practice to have your DB on your EC2?

  • @sean_reyes
    @sean_reyes 3 месяца назад

    Can I use Cloudflare to point the domain to the EC2 instance IP address?

  • @abdullhaseeb4157
    @abdullhaseeb4157 4 месяца назад +1

    How To Solve this
    User sessions running outdated binaries:
    ubuntu @ session #2: apt[1480], sshd[994]
    ubuntu @ user manager service: systemd[999]

  • @siddheshrane6797
    @siddheshrane6797 4 месяца назад

    hi, will these steps work fine for a socket io or websocket node server to deploy of EC2?

  • @nicapotato7745
    @nicapotato7745 Месяц назад

    Really great guide ❤❤

  • @somnathgolui2912
    @somnathgolui2912 9 месяцев назад

    Great video!
    Can you also tell us how to do continuous delivery?

  • @lobsang-b8i
    @lobsang-b8i 6 дней назад

    not clear about my-app directory you move file to ec 2 instance

  • @Nahmad6236
    @Nahmad6236 9 дней назад

    Can we just use docker instead going through all these steps

  • @vishnuitsrocking
    @vishnuitsrocking 4 месяца назад +1

    You are awesome!🔥

  • @tigana
    @tigana 3 месяца назад +3

    saving my life i was abou to have a stroke

  • @hamzaamentag6810
    @hamzaamentag6810 4 месяца назад

    Thanks. This is super cool 👍🏻

  • @marioshadj8409
    @marioshadj8409 10 месяцев назад

    Thanks for the video! Can you make a video on how to handle new version of the app without downtime?

    • @SamMeechWard
      @SamMeechWard  10 месяцев назад +1

      With one server, you wold always experience some amount of downtime. It could be minimal though, just the amount of time it takes to restart caddy, so a few milliseconds. The only way I know of to get absolute 0 downtime is to use multiple ec2 instances with a load balancer, which is much more complex

  • @bigbrain720
    @bigbrain720 7 месяцев назад

    broooo this video is so solid

  • @P.Shivakrishna
    @P.Shivakrishna 8 месяцев назад

    hey can you explain more about migrate postgres sql db into ec2 how to create migrate.ts file and other things

  • @haha7836hahah
    @haha7836hahah 10 месяцев назад

    How can i setup the database so that it is in a private subnet and can be accessed only by the ec2 instances within my vpc

  • @ImpendingSole13
    @ImpendingSole13 9 месяцев назад

    You're amazing. Thanks alot !!

  • @ammaarpeerbhai9914
    @ammaarpeerbhai9914 2 месяца назад

    This was beautiful.

  • @arieladalid9910
    @arieladalid9910 5 месяцев назад

    Really nice explained
    thank you

  • @manuel.blanco
    @manuel.blanco 7 месяцев назад

    Thanks, this helped me a lot!!