Monday, November 20, 2017

What is AWS Lamda ?

AWS Lambda is a serverless compute service that runs the code in response to events.
For ex: When a image is uploaded to Amazon s3 bucket a lamda function can be triggered and resize the image and store it back. Lamda can respond to HTTP request via Amazon API Gateway. One can move their backend code that is being served from nodejs or any other app server to lamda.


Where lamda code runs ?

Lamda code runs on the server manages by AWS.
AWS automatically manages the underlying compute resources. It manages all the server management, provisioning, scaling, performance, security, monitoring, logging etc. So user does not need to worry about anything other than writing the code.


What is Serverless ?

You must have already got the answer by now. We don't need to provision any server while running our lamda code. That does not mean there is no server. Its there but we can not see it. Amazon will manage the server for us. We need to write the code, put it in lamda and AWS will take care of the rest. The server is kind of hidden from us so we call it serverless.


What is lamda function ?

The code we run on AWS Lambda is called a “Lambda function.” Once it is ready it is always available. These functions are stateless. They should ideally perform a unit of work. Each Lambda function runs in an isolated computing environment with its own resources. I would say these are nano service which can group together to create micro-service or itself can be called mico-service
AWS will invoke copy of as many lamda function as it needs to respond to incoming events. This way AWS manages scale and performance.


What are the languages that lamda supports ?

At this point we can write our code in nodejs, java, python and C#. Lamda has support for 3rd party libs and native libs.


How much we need to pay for the lamda service ?

We need to pay only for the compute time of the server. The server will not run for ever. It will be invoked only when there is an incoming event to the lamda.


For more information :
https://aws.amazon.com/lambda/details/

No comments:

Post a Comment