AWS Lambda

What is AWS Lambda ?

AWS lambda is a serverless computing service which means it does not require management of servers. We can simply just upload code through aws-cli or upload a zip file of the code. It does not have a build stage so you have to deploy the entire zip file including the node modules.

Use cases

  • Scheduled Tasks 

  • Rest APIs
  • Data Transformation and ETL
  • Custom backend services

Execution

Lambda function executions are driven through events. There are numerous events to which Lambda can respond and get triggered.

  • AWS Event Bridge

Lambda can be run on regular intervals acting like a cron job with the help of AWS event 

bridge

  • AWS API Gateway

API gateway can be mounted to expose the lambda function as a backend for 

frontends

  • AWS S3

Lambda can be configured to be executed when there is a file upload on the s3.

  • Databases

Lambda can monitor databases like Dynamo DB and execute based on a condition 

For example when a record in a particular table is updated, it can be triggered

Scaling

One of the main advantages of AWS Lambda is that there is no need to manage servers. You don't need to provision or configure instances, and the service automatically handles the scaling of resources based on demand.

It automatically scales based on the number of incoming requests. You don't need to manually provision or manage server resources. It uses a concurrency model to manage the number of function executions that can occur simultaneously. Concurrency is the number of requests being executed at any given time. By default, AWS Lambda supports 1,000 concurrent executions per region per account.

Lifecycle

The execution time is max of 15 mins, the execution will terminate when the timeout has been reached which can be configured up to max of 15mins.

Each Lambda function execution is stateless, meaning the environment is created for each function invocation, and any state must be managed externally (e.g., using a database or other external storage). Lambda can be configured to immediately send responses and continue execution.

To view or add a comment, sign in

More articles by Lakshya Tiwari

Others also viewed

Explore content categories