Skip to main content

What is AWS Lambda? How it works? Define AWS lambda Pricing


Cloud Computing


Before proceeding with AWS Lambda, let’s first understand its domain, Cloud Computing, where AWS has originated from.

Cloud Computing is simply a practice of using a network of remote servers hosted on the Internet to store, manage, and process data, rather than using a local server or a personal computer.

But, why are we talking about AWS when there are numerous other Cloud Computing vendors? Here are some of the major players in the marketplace when it comes to Cloud Computing.

If we talk of services, AWS Compute plays a major role while we work with AWS as it provides us secure and resizable computing capacity on the cloud.



What is AWS Lambda?


AWS Lambda is an event-driven, serverless computing platform provided by Amazon as a part of Amazon Web Services. It is a computing service that runs code in response to events and automatically manages the computing resources required by that code.

The Lambda functions can perform any kind of computing task, from serving web pages and processing streams of data to calling APIs and integrating with other AWS services.


AWS Lambda is a Function-as-a-service (FaaS) computing platform provided by AWS. FaaS provides a computing platform to execute code in the cloud. As in any serverless system, it abstracts away the complexities of provisioning and managing a cloud infrastructure.
How does AWS Lambda work?


Before we are going further for how AWS Lambda works, first, we have to understand a few aspects of the Lambda-based application.

Building Blocks

  • Lambda function: Whatever custom codes and libraries that we create are called a function.
  • Event source: Any AWS or custom service that triggers our function and helps in executing its logic
  • Log streams: Lambda monitors our function automatically and one can view its metric on CloudWatch, directly, but we can also code our function in a way that it provides us custom logging statements to let us analyze the flow of execution and performance of our function to check if it’s working properly.

Using AWS Lambda with S3


  • First, the user creates a Lambda function.
  • The user uploads the code to the Lambda function.
  • Then, the user uploads the image from the website to the S3 bucket as an object.
  • After receiving the object, the S3 bucket triggers the Lambda function.
  • Then, the Lambda function does its job by resizing the image in the back-end and sends a successful completion email through SQS.


Each n every Lambda function runs in its own container. When a function is created, Lambda packages it into a new container and then executes that container on a multi-tenant cluster of machines managed by AWS. Before the functions start running, each function’s container is allocated its necessary RAM and CPU capacity. Once the functions finish running, the RAM allocated at the beginning is multiplied by the amount of time the function spent running. The customers then get charged based on the allocated memory and the amount of run time the function took to complete.


The entire infrastructure layer of AWS Lambda is managed by AWS. Customers don’t get much visibility into how the system operates, but they also don’t need to worry about updating the underlying machines, avoiding network contention, and so on—AWS takes care of this itself.


And since the service is fully managed, using AWS Lambda can save you time on operational tasks. When there is no infrastructure to maintain, you can spend more time working on the application code—even though this also means you give up the flexibility of operating your own infrastructure.
One of the distinctive architectural properties of AWS Lambda is that many instances of the same function, or of different functions from the same AWS account, can be executed concurrently. Moreover, the concurrency can vary according to the time of day or the day of the week, and such variation makes no difference to Lambda—you only get charged for the compute your functions use. This makes AWS Lambda a good fit for deploying highly scalable cloud computing solutions.


AWS Pricing


A number of AWS Lambda executions are included with the AWS Free Tier with every AWS account. Unlike some other services, the Lambda free tier isn’t limited to 12 months. Both existing and new accounts get 1 million AWS Lambda requests plus 400,000 GB-seconds per month — Lambda’s measure of function runtime and the memory allocated to a function.


Beyond the free tier the pricing for AWS Lambda is as follows:
AspectPricingComment
Requests$0.20 per 1M requestsThe free tier includes 1M requests.
Function memory and run time$0.0000166667 per GB-secondThe free tier includes 400,000 GB-seconds.
Inbound network traffic to the Lambda functionFree
Outbound network traffic—within the same AWS region$0.01/GB
Outbound network traffic—to other AWS regions$0.02/GB
Outbound network traffic—to public internet$0.09/GBLower pricing per GB applies starting at 10TB/month.
Amazon API Gateway$3.50 per 1M requestsIf you are using API Gateway with Lambda functions. Lower pricing from 333M requests per month and up.


For each execution, the total cost will be the sum of all applicable factors, including the cost per request, the memory and run time, and the network traffic.


Comments

Popular posts from this blog

What is STP? - Explain Advantages and Disadvantages

The Spanning Tree Protocol is a network protocol that builds a loop-free logical topology for Ethernet networks. The basic function of STP is to prevent bridge loops and the broadcast radiation that results from them. STP is a protocol. It actively monitors all links of the network. To finds a redundant link, it uses an algorithm, known as the STA (spanning-tree algorithm). The STA algorithm first creates a topology database then it finds and disables the redundant links. Once redundant links are disabled, only the STP-chosen links remain active. If a new link is added or an existing link is removed, the STP re-runs the STA algorithm and re-adjusts all links to reflect the change. STP (Spanning Tree Protocol) automatically removes layer 2 switching loops by shutting down the redundant links. A redundant link is an additional link between two switches. A redundant link is usually created for backup purposes. Just like every coin has two sides, a redundant link, along with

What are the Advantages and Disadvantages of TCP/UDP ?? Difference between TCP and UDP

As in previous blog we have define and explain about what is TCP and UDP and from now we are moving ahead with Advantages, Disadvantages and Difference of TCP and UDP but for this you have to know about TCP and UDP hence to understand it go for a What is TCP and UDP . Advantage of TCP Here, are pros/benefits of TCP: It helps you to establish/set up a connection between different types of computers. It operates independently of the operating system. It supports many routing-protocols. It enables the internetworking between the organizations. TCP/IP model has a highly scalable client-server architecture. It can be operated independently. Supports several routing protocols. It can be used to establish a connection between two computers. Disadvantages of TCP Here, are disadvantage of using TCP: TCP never conclude a transmission without all data in motion being explicitly asked. You can't use for broadcast or multicast transmission. TCP has no block boundaries, so you