Build a Node.js API with Express + Serverless + AWS in 15 Minutes
HTML-код
- Опубликовано: 20 июн 2020
- Github Repo: github.com/mguay22/express-se...
Serverless Docs: www.serverless.com/framework/...
Express Docs: expressjs.com/
Get my highly-rated Udemy courses at a discount here: michaelguay.dev/udemy/ Наука
Get my highly-rated Udemy courses at a discount here: michaelguay.dev/udemy/
Great video! After trying to follow a bunch of other tutorials this worked perfectly to migrate my existing nodejs express api to lambda!
One small suggestions, increasing vs code font size helps seeing code better.
A really well made and to-the-point tutorial, thank you!
Thank you Michael for this awesome tutorial.
Thank you for this Tutorial. Great Instructions!
Thank you very much Michael, finally it worked. Thank you so much for your efforts❤
Thanks for the video, just a quick question in .yml file, when defining Handler it will go to the handler file by default in the main folder, ut if the handler files are in src folder , how we can do the connection with it.
Thank you for sharing, it would be greater if the text in the editor is bigger. Very small for me ^^
как же ты полезен, гига чад ипакт момент
This is gold. Awesome
Awesome tutorial :)
It is easy than i expected
Flawless! Thx!
Very good tutorial.
thank you very much
when doing sls deploy i get the following error. Resource handler returned message: "Uploaded file must be a non-empty zip (Service: Lambda, Status Code: 400
Could you please help?
hello bro , i need help about nodejs deplymt on aws EC2. i d'ont know why my api down when i end ssh connection
Great. Thanks
nice tutorial. maybe you can use smaller fonts so i can see much better ;)
How do you connect to a rds postgres database?
Good one but unfortunately I got an error router js not defined as object error encounter..
I keep getting "Cannot GET /user" and 404 not found on every GET requests, even with your code... What do I do wrong ?
Thanks for the video. But I wouldn't use Express in AWS Lambda. The reason is that it will cost me money in memory and time.
I'd keep routing for AWS API Gateway instead. And I can still use middleware (auth for example) if needed.
Agree with this. Schema validation is great too
I use webpack
That's coooool
I tried to go through this tutorial but when I deployed it didn't give me any endpoints. Do you know what the issue could be?
Check the region. I think, it deployed to a region, which is not the one you are looking at in the console.
Nice tutorial. But you may wanna zoom in. Barely can see anything clearly
or you just set the video player as fullscreen lol
Hello sir , please make vidoe that how to insert csv data to dynamodb in serverless framework using lambad in nodejs
hey Michael, how does this work under the hood?, its one lambda? or one lambda by endpoint?, how this scales?. Great video!, thanks in advance.
Hey Loco - great questions. In this example, we used only one lambda. We are proxying each and every endpoint to a single lambda which is what /{proxy}+ in our severless.yml is doing.
However, you could just as easily create a new lambda function for each endpoint, or even a new lambda for each HTTP method! You'd just have to configure it as such in the serverless.yml.
Fortunately (and to answer your question on scaling) - you shouldn't have to do this. The beauty of AWS Lambda is that is scales based on the number of invocations. So if we only receive one GET request, there is only one instance of the lambda spawned. However, if there is a massive burst of traffic that comes towards our API (lambda handler), AWS will automatically scale up the number of instances running our lambda to match the traffic.
This is the great thing about this architecture, it is quick and easy to set up - but it also scales very easily thanks to the inner workings of AWS Lambda. You can read more about lambda function scaling, and how to configure it here: docs.aws.amazon.com/lambda/latest/dg/invocation-scaling.html
I followed the tutorial but I got this error : ApiGatewayResourceProxyVar - Resource's path part only allow a-zA-Z0-9._- and curly braces at the beginning and the end. (Service: AmazonApiGateway; Status Code: 400; Error Code: BadRequestException;
Hi Karim - thank you very much for posting your issue. I will look into it this weekend and get back to you. AWS may have changed their naming conventions for services, I'll have to take a look.
Karim, try changing the HTTP path from path: /{proxy+} to path: {proxy+} and redeploy to see if it helps resolve your issue.
Good tutorial but with some reason I am getting 404.
then I just went you your repo and cloned your project and got the same result 404
when I look at Lambda logs don't see any errors
same here
very good content. but it's barely to see the screen.
Yes, can't think of viewing on mobile.
done
11:29 You type so violently xD
Hey, can I make this completely scalable?
Hi, I would only recommend this simpler architecture for smaller apps with a narrow focus. If you want to build bigger scaleable apps using Express, I recommend using a framework like Nest.js. I have several other videos about this subject.
serverless is not asking for AWS keys anymore its confusing.
Might be the credentials are already saved in your system.
serverless config credentials --provider aws --key
--secret
too small font
How you manage sensitive data like variables or secrets?
Lol explain how install serverless: "npm install -g serverless"