xxxxxxxxxx
It is an AWS serverless computing service offered by Amazon Web Services that runs the code in response to events and automatically manages the compute resource.
xxxxxxxxxx
Many people consider AWS Lambda to be a little confusing, but it is not.
It is just a simple four-step process that begins with uploading code to AWS Lambda.
The next step is to set up your code to trigger from other AWS services, HTTP endpoints, or mobile apps.
AWS Lambda will only run a code when it is triggered and will only use the computing resources needed to run it.
xxxxxxxxxx
fn = lambda_.Function(self, "MyFunction",
runtime=lambda_.Runtime.NODEJS_16_X,
handler="index.handler",
code=lambda_.Code.from_asset(path.join(__dirname, "lambda-handler"))
)
The evolution or timeline of Lambda looks something like this:
On-Prem DataCenter –> IAAS –> PaaS –> containerization/Docker –> Serverless
Lambda is a compute service where you can upload your code and create a Lambda function. AWS Lambda takes care of provisioning and managing the servers that you use to run the code. You do not have to worry about operating systems, patching, scaling etc.
It is essentially described as an event-driven compute service where AWS Lambda runs your code in response to events. These events could be changes to the data in an Amazon S3 bucket or an Amazon Dynamo DB table.
Lambda events can trigger other Lambda events or call other AWS services like SQS or SNS.