Using AWS Lambda[0] — Knowing Lambda Functions

Rahul Tripathi
3 min readJul 22, 2020

--

If you’re here then chances are you might be planning to migrate or build a service on AWS Lambda , so welcome onboard to this journey on using AWS Lambda

AWS-Lambda(https://aws.amazon.com/lambda/)

Let’s take a look at what the AWS Lambda page says

AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume.

With Lambda, you can run code for virtually any type of application or backend service — all with zero administration. Just upload your code and Lambda takes care of everything required to run and scale your code with high availability. You can set up your code to automatically trigger from other AWS services or call it directly from any web or mobile app.

In a nutshell , Lambda functions are small containers (microVMs , Firecrackers — https://firecracker-microvm.github.io/) which run your code and can interact with any aws service , but here’s how they are different from normal containers or ec2 instances

No servers to manage : Lambda automatically runs your code without requiring you to provision or manage servers. Just write the code and upload it to Lambda.

Continuous scaling : AWS lambda run in parallel and scale automatically according to the event triggers . hence no need to worry about load-balancers and autoscaling

of-course there are many other takeaways from what these lambda function offer but these are the two biggest reasons why to switch to lambda.

When to use AWS Lambda ?

The lambda functions can do all sorts of work and can even replace a whole server using appropriate configuration , but here are the most common use cases for AWS Lambda

Data Processing : These functions can be used to process images/files present on s3 and also the data flowing through the Kenesis stream. Lambda functions are generally used here and many organisations are already using it in production . You can read more about it at https://aws.amazon.com/lambda/

Serverless Backends : Lambda functions can also be used as backend for your app/iot/web platform and this is a great use case as you don’t need to configure the server or worry about scaling them

Due to Lambda’s architecture, it can deliver great benefits over traditional cloud computing setups for applications where:

  1. individual tasks run for a short time;
  2. each task is generally self-contained;
  3. there is a large difference between the lowest and highest levels in the workload of the application.

These are the basic point should help you decide whether you should use lambda functions or not

In the follow-up article we’ll discuss about setting up a serverless backend . Feel free to drop a question or a feedback below :)

--

--