AWS lambda

sKiridharan
8 min readMay 4, 2023

In This blog you learn about :

  1. What is Serverless ?
  2. What is AWS Lambda?
  3. How it works ?
  4. Benefits of AWS lambda
  5. Use cases and a case Study .

Whether you’re new to AWS Lambda or an experienced user, this blog will provide you with valuable insights into how to make the most of this powerful and versatile service. So, let’s dive in!

What is Serverless ?

Does “serverless” refer to the use of software that runs without a server or middleware? I’m sure the majority of us wondered this when we first started learning about serverless functions.

That is not the case serverless means:

Serverless is a computing model that allows developers to build and run applications without the need to manage or provision servers. Instead of worrying about infrastructure and managing servers, developers can focus on writing and deploying their code, which is automatically executed by a cloud provider in response to triggers or events.

In a serverless architecture, the cloud provider manages the underlying infrastructure, including servers, storage, and networking, and developers only pay for the actual usage of the resources they consume, rather than for the fixed capacity of a server.

This makes serverless an ideal solution for building highly scalable, event-driven applications that can respond to sudden spikes in traffic and demand, without the need for developers to worry about capacity planning or scaling.

AWS Lambda is one of the most popular serverless platforms, but there are also other serverless platforms available, such as Google Cloud Functions, Microsoft Azure Functions, and IBM Cloud Functions.

Because AWS Lambda is currently the most widely used serverless function, we’ll talk about it in this blog.

We understood about serverless so we’ll talk about AWS lambda.

What is AWS Lambda?

AWS Lambda is a serverless, event-driven compute service that lets you run code for virtually any type of application or backend service without provisioning or managing servers. You can trigger Lambda from over 200 AWS services and software as a service (SaaS) applications, and only pay for what you use.

Let’s break the about statement which was Taken from AWS lambda Docs

  • AWS Lambda is a serverless : We talked about this at top.
  • Event-driven compute service: An event-driven compute service is a type of computing platform that runs code in response to events or triggers.
AWS working
AWS Docs

Example:When an event occurs, such as a user uploading a file or a new record being added to a database, the event-driven compute service automatically executes a piece of code, known as a function, to process the event and generate a response.

  • That lets you run code for virtually any type of application or backend service without provisioning or managing servers: Developers can write code in a variety of programming languages, upload it to AWS, and then specify the events or triggers that will cause the code to run. The code is executed in a stateless container, which is automatically provisioned and managed by AWS Lambda, and developers only pay for the actual compute time used by their functions.

Last Part explain about how lambda can be integrated with different AWS service (I know Kind of AWS show off😉).

Event-driven compute services are ideal for building applications that require a high degree of

  1. scalability, as they can automatically scale up or down based on the number of events or triggers received.
  2. They are also useful for processing real-time data streams, such as sensor data from IoT devices or social media feeds.
  3. By processing data in near real-time event-driven compute services can enable businesses to make faster and more informed decisions.

Working of AWS lambda

Writing code and deploying it to AWS Lambda is as easy . Lambda performs the heavy lifting for you, from provisioning to scaling. But where is the magic happening and how does it actually work under the hood? Lets find out together!

Lambda is split into a control plane and data plane. Each plane is responsible for a specific set of activities in the service. The Control Plane provides management APIs and manages integrations with all AWS services. Whilst the Data Plane is Lambda’s Invoke API that triggers Lambda function invocations, this explanation is still very abstract but things will become clearer over time.

AWS Documentation

A bit Deep Dive (Skip if not needed)

Lambda creates the Execution environment (worker) on a fleet of EC2 instances. These workers are bare metal Nitro instances which are launched in a seperate inaccessible AWS account. These workers have hardware-virtualized MVMs (Micro Virtual Machines) created by Firecracker (Linux’s Kernel-based Virtual Machine). Workers have a lease lifetime of 14 hours, when a worker approaches this maximum, no further invocations are forwarded to the worker and the worker is terminated. Each worker has the ability to host one concurrent invocation, but is being reused if multiple invocations of the same function occur. Lambda never reuses an execution environment across multiple functions.

All communication between workers is encrypted using AES with Galois. Customers cannot directly interact with a worker as it’s hosted in a network isolated VPC in the Lambda AWS service accounts.

Benefits of AWS lambda

  1. Extend other AWS services with custom logic
  2. Build custom backend services
  3. Bring your own code
  4. Completely automated administration
  5. Built-in fault tolerance****
  6. Package and deploy functions as container images***
  7. Automatic scaling***
  8. Run code in response to Amazon CloudFront requests
  9. Orchestrate multiple function
  10. Integrated security module

These are Main Benifits are a lottttt and it can save lot of 💸 and ⏲.

Here is Key Benefits and Feature of AWS lambda: Link

Use Cases and Case Study :

AWS Lambda is a versatile serverless computing platform that can be used for a wide range of use cases. Here are some examples:

  1. Event-driven processing: AWS Lambda is ideal for processing events, such as messages from a messaging service, new records in a database, or files uploaded to a storage service. With AWS Lambda, developers can write functions that are triggered by these events, allowing them to process data in real-time and respond quickly to changes.
  2. Data processing and analytics: AWS Lambda can be used to perform data processing and analytics tasks, such as data transformations, filtering, and aggregation. Developers can write functions that read data from a variety of sources, process it using their own custom logic, and then write the results to a database or data warehouse.
  3. Back-end services: AWS Lambda can be used to build back-end services for web and mobile applications. Developers can write functions that handle authentication, authorization, and other back-end tasks, without the need to manage servers or infrastructure.
  4. IoT applications: AWS Lambda is well-suited for building IoT applications that process real-time data from sensors and devices. Developers can write functions that read data from IoT devices, process it in real-time, and then take action based on the results.
  5. Chatbots and voice assistants: AWS Lambda can be used to build chatbots and voice assistants that interact with users in natural language. Developers can write functions that process user input, generate responses, and perform actions on behalf of the user.

These are just a few examples of the many use cases for AWS Lambda. With its flexibility and scalability, AWS Lambda can be used for a wide range of applications and scenarios, allowing developers to focus on building great software without worrying about infrastructure.

Case Study

Company name : AutoDesk

Info : Autodesk has been making software for the architecture, construction, engineering, manufacturing, and media and entertainment industries for 35 years. Based in San Francisco, the multinational corporation has offices worldwide.

Problem : As the number of AWS accounts in use at Autodesk grew, it became increasingly clear that the account-creation process was a bottleneck. Williams began envisioning a solution that could automatically set up new AWS accounts and update existing ones. He decided to call the new solution Tailor, a nod to the idea that it would deliver accounts that were “tailor made” for Autodesk teams, including all required company configurations and controls.

Soluntion :

Williams decided to build Tailor using a serverless architecture to minimize the time and cost required for infrastructure management.

Tailor uses multiple AWS services, including Amazon DynamoDB (DynamoDB) for data persistence and Amazon API Gateway (API Gateway) for API endpoints.

Automating all Tailor processes from end to end is AWS Lambda, a serverless service that runs code in response to events.

With Tailor, Autodesk developers now submit an online form to request a new account, and an API triggers the account-creation process. The solution, which also supports querying accounts by account number, email address, or IP address, took only one month to develop and launch.

Trailer Arch

Consider how complex this architecture is and how seamless AWS Lambda makes it.

Another example :

Autodesk’s use of AWS Lambda is its Fusion 360 product, which is a cloud-based 3D CAD/CAM tool that enables users to design and manufacture products. To provide a better user experience, Autodesk built a serverless application called “Design Automation for 3D Printing” using AWS Lambda.

This application allows users to generate 3D printable files from their Fusion 360 designs with just a few clicks, without the need for any additional software or plugins. Here is a brief overview of how the application works:

  1. User submits a design: The user submits a design file in Fusion 360 to the “Design Automation for 3D Printing” application.
  2. Design is processed by AWS Lambda: AWS Lambda processes the design file using Autodesk’s custom code, which optimizes the design for 3D printing and generates a printable file.
  3. Printable file is returned to the user: The printable file is returned to the user, who can then download and print it on their 3D printer.

By using AWS Lambda to build this application, Autodesk was able to create a cost-effective, scalable solution that integrates seamlessly with its Fusion 360 product. The application has significantly improved the user experience by reducing the time and effort required to generate 3D printable files, and has helped Autodesk to maintain its position as a leader in the design and engineering software industry.

You’re welcome! If you have any other questions or topics you would like to discuss related to AWS Lambda or serverless computing, feel free to ask.

--

--

sKiridharan

App developer and web development with django python . Learn by reading Practice by coding😍