How to deploy a Node Express API to AWS EC2 instance

  Рет қаралды 51,275

JonathanSanchez

JonathanSanchez

Жыл бұрын

How to deploy a Node Express API to AWS EC2 instance
Here is the related Medium article
/ how-to-deploy-node-exp...

Пікірлер: 118
@KatiuskaAlicea
@KatiuskaAlicea 17 күн бұрын
Hi, I'm a novice and I just started an instance and successfully and my API 😊 The only hiccup I encountered was when I attempted to pull the github repo. I did not have a SSH or token. Once I created my personal token and was able to login I saw my tiny json object in the browser calling out to mama that it was running. Thank you!
@ankushjain358
@ankushjain358 5 ай бұрын
This is really cool, the way you built the entire project from scratch.
@Dr460n4ir3
@Dr460n4ir3 Жыл бұрын
I loved this very stright forward exactly what i was looking for. I appreciate you not waisting time with extra stuff.
@xushengchin511
@xushengchin511 Жыл бұрын
Great, useful, precise, efficient staff. Worth promoting.
@ishuchauhan7138
@ishuchauhan7138 9 ай бұрын
i had a problem and took 5 days to figure out then i came in to this video and it is solved. Thanks man!
@robeeeeerttt
@robeeeeerttt Жыл бұрын
Man, please do not give up from posting videos, you are amazing.
@WikkiOnIlluminati
@WikkiOnIlluminati 4 ай бұрын
@17:30 when i hit my server after following your step by step and API responded. I was over the moon. Thanks
@Jonathansanchezdev
@Jonathansanchezdev 4 ай бұрын
Hahaha I know the feeling 😎
@abhaysingh7477
@abhaysingh7477 6 ай бұрын
I like this tutorial, to the point everything is straightforward. thanks jonathan
@LucasFerreira-jm5ie
@LucasFerreira-jm5ie 9 ай бұрын
Simple and to the point, great explanation.
@UsaSzerelem
@UsaSzerelem 10 ай бұрын
Thank you Jonathan. Your explanation was clear and very helpful.
@alonaastakhova8533
@alonaastakhova8533 6 ай бұрын
Millions of thanks! I did it! My first interaction with AWS...
@dmytroboiko1
@dmytroboiko1 5 ай бұрын
Thank you. This is very good starter! It's important for people who never ran such kind of APIs. Connection to instances and AWS security stuff can be difficult, and here provided very minimum but robust case. Like & use it guys.
@adarsh-chakraborty
@adarsh-chakraborty 6 ай бұрын
Thank you so much!! I needed the security thing after creating the instance.
@imarichildress6297
@imarichildress6297 Жыл бұрын
Great clean instructions. Very helpful.
@piyush6631
@piyush6631 8 ай бұрын
Simple short and concise! Thank you for posting this tutorial. It's very helpful for someone who have little idea about how to host applications on cloud, especially with AWS where there are so many different options to configure a service
@Jonathansanchezdev
@Jonathansanchezdev 4 ай бұрын
Thanks for the message, glad it helped.... 👍
@user-mv9jn7vd2u
@user-mv9jn7vd2u 4 ай бұрын
hi. i have some env variables and i dont know how to scp them in ec2 do you have any tutorial about that?@@Jonathansanchezdev
@Sillymonkeies
@Sillymonkeies 11 ай бұрын
Great video man! This was my second time using your video. I'm sure there'll be lots more! God bless
@davidobodo3605
@davidobodo3605 11 ай бұрын
thank you so much, this was very straightforward and clear
@luizoamorim
@luizoamorim Жыл бұрын
Very good tutorial! Thank you!
@ayush--gupta
@ayush--gupta 10 ай бұрын
Thanks for such wonderful explanation.
@polar5631
@polar5631 Жыл бұрын
Thanks a ton man! This really helped walk a beginner like me through :)
@adehenry9591
@adehenry9591 11 ай бұрын
I love this, straight to the point 👍
@user-uc5xt4ym9c
@user-uc5xt4ym9c 8 ай бұрын
Amazing tutorial!!! Thank you so much
@user-yq7hz6zv6m
@user-yq7hz6zv6m 5 ай бұрын
Dude i just wanted to thank you, this was extremely helpful. You are amazing man. Props
@Jonathansanchezdev
@Jonathansanchezdev 4 ай бұрын
wow thanks for the message.... glad it helped 👍
@dzhenek
@dzhenek Жыл бұрын
bro thank you so much it was the best working explanation about EC2 deployment. Helped a lot!
@GeKKo365
@GeKKo365 10 ай бұрын
God tier video! Helped me so much thank you!!
@AliAsghar-programmer
@AliAsghar-programmer Жыл бұрын
Thanks a lot sir, really amazing video
@FilipSrankota
@FilipSrankota Жыл бұрын
Wow! Beautiful step by step tutorial. Thank you.
@Jonathansanchezdev
@Jonathansanchezdev Жыл бұрын
Glad it was helpful! 👍
@nayanthulkar1659
@nayanthulkar1659 2 ай бұрын
Greatly explained ❤
@yuvalue
@yuvalue 4 ай бұрын
thanks brother, I followed along and everything is working perfectly, very appreciated
@lubwamaemmanuel7743
@lubwamaemmanuel7743 Жыл бұрын
Thanks a lot, this really helped and I learnt a lot.
@justcoder2868
@justcoder2868 3 ай бұрын
This is a great video the one thing that would be great to see is how to add env variables. Thanks again
@mike-wm9ji
@mike-wm9ji 10 ай бұрын
Great video, helped a lot!
@swaralipatil9993
@swaralipatil9993 17 күн бұрын
You are amazing☺ well explained👍👍
@duongdinhxuan7794
@duongdinhxuan7794 Ай бұрын
thank you very much, it helped me a lot. It was very clear
@FauroOficial
@FauroOficial Жыл бұрын
wow amazing tutorial!!, thanks a lot!
@LakyOk
@LakyOk Жыл бұрын
Sos un genio!! Saludos desde Argentina
@eliaspaulinho8435
@eliaspaulinho8435 Ай бұрын
really nice!! i am using Xestjs and i was wondering how to deploy my API, your video is really helpfull
@yemam4156
@yemam4156 6 ай бұрын
Thanks a lot for the video
@brunofelixf
@brunofelixf Жыл бұрын
Amazing tutorial!!!
@vedantchak9638
@vedantchak9638 Жыл бұрын
This is wonderful!
@olegt.8912
@olegt.8912 10 ай бұрын
Good job !!! Thank You!
@loksblnine
@loksblnine 8 ай бұрын
great tutorial!
@quofintech9200
@quofintech9200 5 ай бұрын
Your videos are awesome!
@Jonathansanchezdev
@Jonathansanchezdev 4 ай бұрын
Glad you enjoyed them, I have more coming out soon....
@alexmercer416
@alexmercer416 2 ай бұрын
17:23 IS VERY HELPFUL. THANK YOU
@user-ui1fe2bd9w
@user-ui1fe2bd9w 11 ай бұрын
nicely done!
@haveagoodday544
@haveagoodday544 Жыл бұрын
Beautiful! Thank You! I have 2 questions. (1) How can we set security headers, if I want to allow only one url to hit the API, though that is under dynamic IP protocol, so I cannot restrict inbound security to one IP? (2) How can I add a custom domain to this, so instead of the IP address we see a specific domain name? Thank you in advance for your insights!
@malumbosiwale3832
@malumbosiwale3832 2 ай бұрын
after 48 hrs of trying to figure out some other outlandish solutions, this video worked for me! GC -> AWS
@MrSimaTai
@MrSimaTai 7 ай бұрын
thank a lot your works. You realy gave me hope ^^
@ayomikuolatunji1580
@ayomikuolatunji1580 Жыл бұрын
You made a developer. I love you
@lemonyth
@lemonyth 4 ай бұрын
thank you so much
@duarrdo_g
@duarrdo_g 11 ай бұрын
Thank you very much
@AjayKumar-cq7mz
@AjayKumar-cq7mz 11 ай бұрын
thankyou for the video
@palu83x00
@palu83x00 4 ай бұрын
much thanks
@HenrryWith2Rs
@HenrryWith2Rs 3 ай бұрын
Brother tu eres un CRANEO! I spent weeks on this and gave up. just couldn't do it. Ran through your tutorial and finally got it working in les than an hour. Would you happen to have anything similar for lambdas? either way you got yourself a like and a follow
@user-pj3wg2my9c
@user-pj3wg2my9c 2 ай бұрын
Great explanations and amazing efforts, one question though how to keep running the server even after closing the terminal??
@CamiloLopez-vw8ie
@CamiloLopez-vw8ie Жыл бұрын
you are amazing
@DP_CP
@DP_CP 18 күн бұрын
great!!
@marlysaguila5564
@marlysaguila5564 11 ай бұрын
DIos mío no sé cómo agradecerte me funcionó luego de mucho quebradero de cabeza INFINITAS GRACIAS!!!!!!
@Jonathansanchezdev
@Jonathansanchezdev 4 ай бұрын
Wow que, lindo mensaje, gracias....
@vitorsantos3686
@vitorsantos3686 Жыл бұрын
trank you very much
@411sev
@411sev Жыл бұрын
Thank you sir.
@santiagocalabro8919
@santiagocalabro8919 Жыл бұрын
Thank you for this tutorial Jonathan, it has been very clear and concise! Just one question. I'd like to keep the server running and connected permanent. How can I do that with AWS? Because in the moment I closed the terminal, the server shutted down. In this case, there isn't much difference with running it on localhost. Thank you in advance!
@dineshpr
@dineshpr 9 ай бұрын
That's where you have to use pm2..
@sahartoledano7116
@sahartoledano7116 7 ай бұрын
Very helpful 🙏🏼 I have two questions 1. If i want to call the API you published, do i need to use VPN or something? 2. How to connect that ec2 instance to dns service on AWS ? Thank you 👏🏼
@egorshumanskii8026
@egorshumanskii8026 Жыл бұрын
Super!
@phoolherreracondezo2841
@phoolherreracondezo2841 10 ай бұрын
this is video i liked, what certifcation i doing for find job :3
@cachis7168
@cachis7168 9 ай бұрын
Is there a way to use port 80 for don't specify the port?
@usamakhan294
@usamakhan294 7 ай бұрын
concise and easy Thanks man
@krish.mehta.3822
@krish.mehta.3822 2 ай бұрын
I have a question.. If I launch an EC2 instance like this and I hit aprox 50-100 requests will it start charging me?
@jlh-archive
@jlh-archive Жыл бұрын
Do you know how to fix SSL not working? I can access the IP with http but not https
@wadanemacho
@wadanemacho 8 ай бұрын
Fantastic! is there a Windows pc demo or source?Thanks
@khawajakhalil6168
@khawajakhalil6168 Ай бұрын
Hey, great video, but when I close my terminal it stops working, how do i keep it running all the time?
@ekeneidiagbor4678
@ekeneidiagbor4678 10 ай бұрын
Good tutorial thanks a lot. How do you handle re deploying updates?
@Jonathansanchezdev
@Jonathansanchezdev 4 ай бұрын
At this stage, unfortunately is a manual process of pushing your changes to GH and pulling the changes from the server. But for true CI/CD we could use Github Actions to able to accomplish this, hope this gives some direction, but definitely a good next tutorial to create.
@denmarkdelpuso3737
@denmarkdelpuso3737 Жыл бұрын
Hi thank you for the tutorial. How about amazon linux aws ? Is it the same process? ?
@Jonathansanchezdev
@Jonathansanchezdev Жыл бұрын
yes except you'll have to use the Amazon AMI commands to install the missing packages, using yum but you could use this curl -o- raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash . ~/.nvm/nvm.sh nvm install node then install the version of node you need like this nvm install 16
@rickfontes5216
@rickfontes5216 2 ай бұрын
I've upload my API to an EC2 instance, but the API only works if I access the machine using SSH and run the start command. How can I do my API run all the time?
@babafemiolasunmade774
@babafemiolasunmade774 Жыл бұрын
awesome step by step process.. i have a challenge.. my app has env variables..how do i sort that
@samuel2221
@samuel2221 Жыл бұрын
Do the following at the root of your application: 1. cat > .env 2. paste your environment variables and exit. 3. nano .env to update your environment variables. I hope it helps ☺
@yanmanyiu7774
@yanmanyiu7774 Жыл бұрын
very goo tutorial, very thank you i have one question i want the web server keeping run, but when i close the terminal, the webserver will turn off what can i do to keep web server running
@simonmafanye.3537
@simonmafanye.3537 Жыл бұрын
Same question i have.
@ogt1407gabriel
@ogt1407gabriel Жыл бұрын
you need to use PM2, he left those steps on his medium article link in his description
@alejandrocr9293
@alejandrocr9293 2 ай бұрын
Te amo
@shakeelali9418
@shakeelali9418 Жыл бұрын
hello brother, I have a question where I can find the .env file in node js ec2 AWS ubuntu instance and how I can update it
@ogt1407gabriel
@ogt1407gabriel Жыл бұрын
Do the following at the root of your application: 1. cat > .env 2. paste your environment variables and exit. 3. nano .env to update your environment variables.
@ElpidioNLimaJunior
@ElpidioNLimaJunior 6 ай бұрын
very good... But when i close the SSH/Putty terminal my application down too... How i do to stay UP application same i close de SSH or Putty terminal ?
@Jonathansanchezdev
@Jonathansanchezdev 4 ай бұрын
Hope you got it resolved, but if you haven't, at the bottom of this article you will find how to persist the API running using a tool like PM2 jonathans199.medium.com/how-to-deploy-node-express-api-to-ec2-instance-in-aws-bc038a401156
@ogt1407gabriel
@ogt1407gabriel Жыл бұрын
It works your a genius, but now how do i do to leave it running while i close aws?
@ogt1407gabriel
@ogt1407gabriel Жыл бұрын
never mind i found it in your medium article thanks man
@franciscosantana2184
@franciscosantana2184 4 ай бұрын
genio
@Jonathansanchezdev
@Jonathansanchezdev 4 ай бұрын
Gracias ojala te aya servido de algo
@AyushKumar-uu8vc
@AyushKumar-uu8vc Жыл бұрын
could you please make same thing for golang API..?
@j.k.ravshanovich
@j.k.ravshanovich Жыл бұрын
On my first attempt the intance worked fine. I created another inctance following the same steps. But API is not working. The URL (public IP address with port) doesn't simply respond even though I have included port number in IPv4 in inboud rules.
@sivaharishm314
@sivaharishm314 Жыл бұрын
Did you fix that ? If yes, how did you?
@j.k.ravshanovich
@j.k.ravshanovich Жыл бұрын
@@sivaharishm314 It looks like instance was working fine. I just copied the IPv4 address and pasted into the browser. It worked!
@abhishekkandikonda1085
@abhishekkandikonda1085 6 ай бұрын
how to set up the https for the bare ip address because it is running on http
@Jonathansanchezdev
@Jonathansanchezdev 4 ай бұрын
For this one is a bit more involved, but here is an article that I wrote a while back, that might help. medium.com/@jonathans199/how-to-apply-ssl-for-https-to-node-express-api-in-aws-ec2-instance-acd43dcbfd4
@sahilvij2859
@sahilvij2859 Жыл бұрын
it worked only one time can you help now when i try it says unable to connect
@HarshSharma-ct7pz
@HarshSharma-ct7pz 11 ай бұрын
I'm getting Cannot GET / error, what to do?
@francisakindejoye244
@francisakindejoye244 Жыл бұрын
How will I set environment variables in ec2 instance? Will I create another .env file in the ec2 instance?
@Peter-yd2ok
@Peter-yd2ok Жыл бұрын
Did you figure it out?
@piyush6631
@piyush6631 8 ай бұрын
I could be wrong but can't you copy the .env file from your system to the server directory inside the ec2 instance? It'll then be able to read the env file
@Jonathansanchezdev
@Jonathansanchezdev 4 ай бұрын
Yes correct, you could copy your local .env file into the Ubuntu EC2 instance, but this could be a bit more involved, so you could just make a new .env file on the server and copy/paste the Environment variables there.
@brianvanvlymenpaws
@brianvanvlymenpaws Ай бұрын
is free to use it?
@MrCuteguylol
@MrCuteguylol 8 ай бұрын
how to add env variables?
@Jonathansanchezdev
@Jonathansanchezdev 4 ай бұрын
So basically you'll need to create the .env file manually on the server via nano or vim. Let me know if that makes sense.
@MrCuteguylol
@MrCuteguylol 4 ай бұрын
@@JonathansanchezdevThank you! It makes complete sense. Ill try nano :) Thank you!
@demurestlmc8361
@demurestlmc8361 4 ай бұрын
like
@akapriyanshusinghdev
@akapriyanshusinghdev 6 күн бұрын
Api Not working with production frontend
@softwareindustryfacts6770
@softwareindustryfacts6770 3 ай бұрын
but this link not working with what to do
@thyplosion9
@thyplosion9 Жыл бұрын
You did not use PM2
Full Node.js Deployment - NGINX, SSL With Lets Encrypt
31:25
Piyush Garg
Рет қаралды 46 М.
[Vowel]물고기는 물에서 살아야 해🐟🤣Fish have to live in the water #funny
00:53
NO NO NO YES! (50 MLN SUBSCRIBERS CHALLENGE!) #shorts
00:26
PANDA BOI
Рет қаралды 102 МЛН
Sigma Girl Education #sigma #viral #comedy
00:16
CRAZY GREAPA
Рет қаралды 73 МЛН
Deploy NodeJS Application on AWS - Amazon Web Services | NodeJS
19:51
Deploy Node.js Backend on AWS EC2 Windows
17:33
Prograamer
Рет қаралды 11 М.
Why I love AWS Amplify - Deploy Next.js (T3 Stack) in 5 minutes
7:52
AWS EC2 with Node.js and MongoDB
18:13
Aaron White
Рет қаралды 32 М.
Deploy Node app on AWS EC2 Amazon Linux 2
14:51
Sam Meech-Ward
Рет қаралды 82 М.
Top 50+ AWS Services Explained in 10 Minutes
11:46
Fireship
Рет қаралды 1,4 МЛН
Connect to AWS EC2 instance | SSH from Windows | .PEM Key
10:31
JasCloudTech
Рет қаралды 78 М.
How to deploy Express Server on AWS Lambda
5:41
Code With Vini
Рет қаралды 19 М.
[Vowel]물고기는 물에서 살아야 해🐟🤣Fish have to live in the water #funny
00:53