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/
  • НаукаНаука

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

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

    Get my highly-rated Udemy courses at a discount here: michaelguay.dev/udemy/

  • @NateBabbel
    @NateBabbel 2 года назад +6

    Great video! After trying to follow a bunch of other tutorials this worked perfectly to migrate my existing nodejs express api to lambda!

  • @praveen_govind
    @praveen_govind 2 года назад +13

    One small suggestions, increasing vs code font size helps seeing code better.

  • @MasterFqF
    @MasterFqF 2 года назад +5

    A really well made and to-the-point tutorial, thank you!

  • @pradeepchoudhary381
    @pradeepchoudhary381 3 года назад +1

    Thank you Michael for this awesome tutorial.

  • @5h00G0fg
    @5h00G0fg 3 года назад +1

    Thank you for this Tutorial. Great Instructions!

  • @VenkateshMogili
    @VenkateshMogili 2 года назад

    Thank you very much Michael, finally it worked. Thank you so much for your efforts❤

  • @rock_0075
    @rock_0075 3 года назад +1

    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.

  • @GoodLife-Thailand
    @GoodLife-Thailand 2 года назад +3

    Thank you for sharing, it would be greater if the text in the editor is bigger. Very small for me ^^

  • @user-sk9dx6ve7r
    @user-sk9dx6ve7r Год назад

    как же ты полезен, гига чад ипакт момент

  • @orhn
    @orhn Год назад

    This is gold. Awesome

  • @mitlandir5761
    @mitlandir5761 2 года назад

    Awesome tutorial :)

  • @MinhYNguyen
    @MinhYNguyen 2 года назад

    It is easy than i expected

  • @rolikaseventysix
    @rolikaseventysix 3 года назад

    Flawless! Thx!

  • @thebigbrickhouse5324
    @thebigbrickhouse5324 Год назад

    Very good tutorial.

  • @nkaujhmoobentertainment1724
    @nkaujhmoobentertainment1724 3 года назад

    thank you very much

  • @vishalborana5465
    @vishalborana5465 2 года назад

    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?

  • @jean-aquilasboua9768
    @jean-aquilasboua9768 Год назад

    hello bro , i need help about nodejs deplymt on aws EC2. i d'ont know why my api down when i end ssh connection

  • @wilsonemmanuel1352
    @wilsonemmanuel1352 2 года назад

    Great. Thanks

  • @bswill5077
    @bswill5077 3 года назад +1

    nice tutorial. maybe you can use smaller fonts so i can see much better ;)

  • @warriorgeneral2735
    @warriorgeneral2735 3 года назад

    How do you connect to a rds postgres database?

  • @niteshsingh9354
    @niteshsingh9354 3 года назад

    Good one but unfortunately I got an error router js not defined as object error encounter..

  • @c4346
    @c4346 Год назад

    I keep getting "Cannot GET /user" and 404 not found on every GET requests, even with your code... What do I do wrong ?

  • @MiladCale
    @MiladCale 3 года назад +7

    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.

  • @MinhYNguyen
    @MinhYNguyen 2 года назад

    That's coooool

  • @dondonjohnathan795
    @dondonjohnathan795 3 года назад

    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?

    • @rolikaseventysix
      @rolikaseventysix 3 года назад

      Check the region. I think, it deployed to a region, which is not the one you are looking at in the console.

  • @NickBortisaaggy18
    @NickBortisaaggy18 3 года назад +9

    Nice tutorial. But you may wanna zoom in. Barely can see anything clearly

    • @danilocecilia7831
      @danilocecilia7831 3 года назад

      or you just set the video player as fullscreen lol

  • @riazahmad5975
    @riazahmad5975 Год назад

    Hello sir , please make vidoe that how to insert csv data to dynamodb in serverless framework using lambad in nodejs

  • @locodev770
    @locodev770 3 года назад +1

    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.

    • @mguay
      @mguay  3 года назад +6

      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

  • @karimelreweny8218
    @karimelreweny8218 3 года назад

    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;

    • @mguay
      @mguay  3 года назад +1

      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.

    • @mguay
      @mguay  3 года назад +1

      Karim, try changing the HTTP path from path: /{proxy+} to path: {proxy+} and redeploy to see if it helps resolve your issue.

  • @volodymyrpliuta3916
    @volodymyrpliuta3916 3 года назад

    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

  • @spherechords1790
    @spherechords1790 3 года назад +2

    very good content. but it's barely to see the screen.

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

    done

  • @ba8e
    @ba8e 2 года назад +1

    11:29 You type so violently xD

  • @kushagrakumar6892
    @kushagrakumar6892 3 года назад

    Hey, can I make this completely scalable?

    • @mguay
      @mguay  3 года назад +1

      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.

  • @nataliapalweski2072
    @nataliapalweski2072 3 года назад +1

    serverless is not asking for AWS keys anymore its confusing.

    • @NITINAGAM
      @NITINAGAM 3 года назад

      Might be the credentials are already saved in your system.

    • @surajkarale8105
      @surajkarale8105 3 года назад

      serverless config credentials --provider aws --key
      --secret

  • @peziom-rn7sv
    @peziom-rn7sv 2 месяца назад

    too small font

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

    How you manage sensitive data like variables or secrets?

  • @valicknjoyis6312
    @valicknjoyis6312 2 года назад

    Lol explain how install serverless: "npm install -g serverless"