AWS Lambda

Smita Nangare
Globant
Published in
4 min readJul 26, 2022

The computing platform provided by Amazon is event-driven and serverless as part of Amazon web services. AWS Lambda can only be used to execute background tasks. It provides an easier way to reduce repetitive manual tasks of managing OS access control, provisioning, scaling, etc.

I. Features of Lambda:

  1. No Worries about the Server
    All we need to do is write the code and upload it to Lambda. We don’t need to worry about provisioning and managing servers. Lambda will execute our code.
  2. Automatic Scaling
    Based on the size of the workload, scaling is done. In response to each trigger, Lambda scales the running application.
  3. Metering on the second
    We are not required to charge for any of the servers. The only payment required is for the amount of time the code is computed.

II. What is AWS Lambda:

  1. AWS provides the ‘Compute’ domain of the services, AWS Lambda is one of the services that fall under Compute domain.
AWS Lambda in Compute Domain

2. Lambda allows us to execute any kind of application.

3. Lambda can be used to run code in response to certain events from other services. All we need to do is write code in one of the languages that AWS
Lambda supports. AWS lambda supports prominent programming languages as Node js, java, c#, GO and python…

What is AWS Lambda

III. AWS Lambda Possible Use-Cases:

  1. AWS Lambda is used to process images when it’s uploaded to an S3 bucket.
Image Processing

2. To Analyze social media data.

Social Media Data Analysis

3. Some of the companies that use AWS Lambda include Coca-Cola, NORDSTROM, ROBOT, etc.

IV. How Lambda Works:

1. Client sends a request to lambda. The client could be anyone including an application or other amazon services. Lambda receives the request and depending on the size/amount/volume of the data, it runs on a defined number of containers.

2. Container is a lightweight, standalone, executable package and a piece of software to run the code like system tools, system libraries, and any other
settings needed. Container isolates software from its surroundings, this helps in reducing the conflicts in different software on the same infrastructure.

3. With an increasing no of requests, an increasing no of containers are created and vice versa.

AWS Lambda Work

V. AWS Lambda Terms:

  1. Function:
    AWS Lambda function sends a response after processing invocation events. The function is the script that AWS lambda runs.
  2. Runtimes:
    Runtimes provide the same base execution platform for functions from different programming languages which configures this at runtime.
  3. Event Source:
    Events source is an AWS service that triggers the AWS function to execute logic.
  4. Lambda Layers:
    AWS libraries, functions, and runtimes are clubbed together inside this. It provides separation in terms of developed and developing code.
  5. Log Streams:
    It’s a custom logging mechanism for function execution.

VI. How to Use AWS Lambda:
Following are very basic four steps to be followed to make use of AWS Lambda:

1. Enter https://aws.amazon.com/lambda/ URL in the browser to get started.
2. Need to sign in or create an account for new users.

Image via [https://aws.amazon.com/lambda/]

3. Edit the code and Run.

Image via [https://aws.amazon.com/lambda/]

4. Check your code’s output.

Image via [https://aws.amazon.com/lambda/]

VII. Advantages of AWS Lambda:

1. It’s a plugin for IDEs like Visual Studio, Eclipse, etc.

2. It allows us to run our code without interacting with the server.

3. It provides a cloud watch to monitor the real-time performance of our code.

4. To get output within a millisecond AWS Lambda will be best suited for our code.

5. It’s a flexible tool to use.

VIII. Limitations of AWS Lambda:

1. For small projects AWS lambda is not suitable.

2. If our code demands the installation of any additional software, then it will not be possible as AWS lambda relies on AWS for infrastructure.

3. Event requests should be up to 128 KB.

4. Only in Cloud Watch can we write lambda function logs.

--

--