AWS Lambda Tutorial: How to deploy Node.js REST APIs on aws lambda Function

preview_player
Показать описание
In this video we are going to deploy our Expressjs rest api on aws lambda function using serverless framework
which is a great combination, super simple to use and extremely powerful

So if you are not familiar with lambda. so let me tell you its new paradigm that provides function as a service

So lambda is a cloud computing architecture where the application owner does not purchase, rent, manage, our provision the servers,
instead aws manages the infrastructure side of the things for the applications.

The biggest advantages of this architecture is that provisioning of servers is done dynamically to meet the real-time computing demand

serverless doesn't mean it run without server it means we don't need to manage the server side things so we could only focus on development

Functions-as-a-Service (FaaS) is a business model that lets you execute a piece of code and only charges you for the resources you use. As a developer, this means that you don't have to think about managing servers and scaling. You just focus on code.

There are several service providers who provide FaaS, such as Amazon Web Services Lambda, Google Cloud Functions, and Microsoft Azure Functions.

In this video we will:

Understand Serverless
Convert the Express app to make it ready to deploy on the Lambda environment
Set up Serverless Framework and deploy the application to AWS Lambda
Finally, test our application

Why use Serverless

Cost-effective:
With a serverless architecture, you pay only for what you use. There is no idle capacity, no wasted resources, or money.

No Server Management:
Say goodbye to backend infrastructure management. No downtime, no provisioning or maintaining of servers ever again.

Virtually limitless scalability:
Scale only functions and not the application. Scaling up or down is as simple as executing a few lines of code.

High availability:
Extreme fault tolerance, which is made possible by multiple redundancies, is baked into the serverless architecture.
Рекомендации по теме
Комментарии
Автор

Awesome tutorial mate. Concise and rich. Was wondering if you could share a repo that has all you've explained.

maysamtayyeb
Автор

for those who are getting internal server error, pls make sure that you are doing *module.exports = app* im your server.js file

kkvaruas
Автор

Thank you! The tutorial I needed! :) Keep up the good work 😃

kurisuta
Автор

any production grad tutorial on serverless please . including ssl, load balancing, domain connection

patshalaaa
Автор

Great Tutorial, all is working fine, i have problems with custom headers with tokens, do you have any tutorial about this problem? Thank You

eduardocampili
Автор

Are you sure that that’s an express.js server? Helpful tutorial in any case. Thanks!

Benjamin-Chavez
Автор

i have create already api gateway and lambda function . i want deploy on this lambda function using api gateway path. what is approach ?

nageshswamii
Автор

I am using express with typescript with ES2017. Then how to go about with Lambda deployment?

akhil_kathi
Автор

+1 For putting efforts in making this video
-1 For no providing the source code.

SoubhikChatterjee-uw
Автор

why did you create node httpServer, it seems you are not using fully
serverless ?

udaykumar-cxlu
Автор

Is there any production grade video. please give me a link

patshalaaa
Автор

this is responding with {"message": "Internal server error"} while the API sunning perfectly on Local

kritarthsinghal
Автор

The interface to integrate lambda serverless and your rest api server is the handler.js, am I right? Thanks

cheung
Автор

Either "handler" or "image" property needs to be set on function "events". i am getting error

suryak
Автор

the image after uploading by lambda api is showing not supported format before i wast uploading with localhost api it was working any suggestion ?

DeveloperDhiraj
Автор

I have mongo dB uri added as a variable in server less yaml file but after deployed I accessed the url it's showing error like parsing error. How to handle this issue

Error: undefined INFO Error: MongoParseError: Incomplete key value pair for option

sankarprakash
Автор

I build one mern stack app and deployed it in aws lambda, but when I try to access got internal error. Then came to know that there parsing error with mongodb url added in serverless yaml file. It's having special character like @ :, so it's parsing error. How to handle this? I tried by passing key followed by pipe symbol also it's not working.

undefined INFO Error: MongoParseError: Incomplete key value pair for option

sankarprakash
Автор

It is okayish because it's not a good idea to use only 1 lambda function for all endpoints

frazbakht
Автор

Is it a good way to run the entire application on a single lambda?

rabbyhossain
Автор

I am facing this error while creating serverless create -t aws-nodejs Error:
Could not download template. Ensure that you are using the latest version of Serverless Framework: Timeout awaiting 'request' for 30000ms
Please help me to sort this out

mirzaali
welcome to shbcf.ru