Deploy NodeJS API on AWS Lambda Function | Create Api using AWS Api Gateway

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ก.ย. 2024
  • In this video, we are going to deploy our sample Node.js rest API on AWS lambda function and Api Gateway.
    #NodeJS #tutorial #WebDevelopment #Coding

ความคิดเห็น • 12

  • @yashgupta5208
    @yashgupta5208 3 หลายเดือนก่อน

    Thanks, very very helpful video

  • @naveenkumaravelmurugaian4891
    @naveenkumaravelmurugaian4891 ปีที่แล้ว +1

    Great video

  • @saiprasadrathod3681
    @saiprasadrathod3681 ปีที่แล้ว +1

    thanks for video

  • @UFOnaliM
    @UFOnaliM ปีที่แล้ว +1

    thanks, it is helpful

  • @teranneranga3586
    @teranneranga3586 ปีที่แล้ว +2

    Thanks, can we create an api as we do with express?

    • @indrasen715
      @indrasen715  ปีที่แล้ว

      Hi
      I hope you're doing well.
      Certainly, you can develop an API using any programming language of your choice. Once you have your API ready, you can upload it to a Lambda Function. To create an endpoint for your API, you can utilize the capabilities of the API Gateway. I will be sharing a new video soon that demonstrates how to create an API from scratch.
      Thank you!

    • @abdullahajibade7210
      @abdullahajibade7210 5 หลายเดือนก่อน

      @@indrasen715 we have not seen the video

  • @ahhsan11
    @ahhsan11 10 หลายเดือนก่อน

    if we already have an fully NodeJS/Express application developed, with all the routing,
    How can we upload that using this method, will we have to create a lambda function for each and every route ?

    • @indrasen715
      @indrasen715  7 หลายเดือนก่อน +3

      When deploying an existing Express application on AWS Lambda, you typically create a single Lambda function for your entire application, not necessarily one function per route. AWS Lambda functions are designed to handle specific functions or applications, and you can configure your Express application to work within a Lambda function.
      Here are the general steps:
      • Set up a new Lambda function in the AWS Management Console or using the AWS CLI.
      • Configure the function with an appropriate runtime, such as Node.js, since your Express app is likely written in JavaScript.
      • Bundle your existing Express application along with its dependencies into a deployment package. This package should include your package.json file.
      • Set up the handler for your Lambda function. The handler is the function that Lambda calls to start execution. In this case, it would be the entry point of your Express app.
      • If your Express app relies on environment variables, configure them in the Lambda function settings.
      • You might want to use Amazon API Gateway to manage and expose your routes as HTTP endpoints. This allows you to map API Gateway routes to specific Lambda functions or routes in your Express app.
      • Test your Lambda function locally using tools like AWS SAM CLI or other serverless development frameworks.
      • Debug any issues that may arise during the transition to the serverless environment.
      Remember that AWS Lambda functions handle individual events, so the Lambda function for your Express app should be capable of handling incoming HTTP requests and routing them internally to the appropriate Express route.