Skip to main content

Basic Understanding on AWS Lambda

In this article, we will discuss "Brief Understanding on AWS Lambda". As we know, Amazon Web Services (AWS) offers more than 200 services. Today, I'll try to explain to you AWS Lambda in simple terms. You get a brief exposure to what exactly the AWS Lambda is, how it works, its limitations, benefits, costing, and more.

What is AWS Lambda?


Lambda is a serverless, event-driven compute service. Here, we run our code without provisioning and managing any server. AWS Lambda functions are scaled automatically, from a few requests to thousand requests per day or second. You can pay only for the compute time, it will not change us when our function is not running.

We can invoke a Lambda function using the Lambda API, AWS CLI or Lambda can run our function to handle the response of other AWS services. Some of the common examples are given below:

  • Process streaming data stored in Amazon Kinesis.

  • Handle user response in Amazon Connect in between the calls.

  • Process two-way communication of Amazon Pinpoint using Amazon SNS.


Lambda Streaming Process


We can use AWS Lambda and Amazon Kinesis to process real-time streaming data for application activity tracking, transaction order processing, clickstream analysis, data cleansing, log filtering, indexing, social media analysis, IoT device data telemetry, and metering.

I will explain more about the AWS Lambda and Amazon Kinesis for delivery reports of Pinpoint messages and AWS Connect (Contact Center) in our coming articles.

 

[caption id="attachment_3044" align="aligncenter" width="951"] aws.amazon.com[/caption]

AWS Lambda Feature


Some are the AWS Lambda Feature mentioned below.

  • No new language knowledge, tool, or framework is required for AWS Lambda. AWS Lambda natively supports Java, Python, C#, Node Js, Go, PowerShell, and Ruby.

  • AWS Lambda manages all the infrastructure and scales those automatically. So we can focus on the required development.

  • Lambda offers built-in logging and monitoring through Amazon CloudWatch.

  • It offers multiple options like AWS S3 Bucket, CloudWatch, DynamoDB, Amazon Kinesis Stream, and many more to trigger an event.

  • We can use AWS Lambda to create new backend application services triggered on-demand using the Lambda application programming interface (API) or custom API endpoints built using Amazon API Gateway.

  • We pay only for the request served and compute the time required to run the code.

  • AWS Lambda is secure and used AWS IAM role and policies. Each service required the related policies and role otherwise created Lambda function will not work.


AWS Lambda Pricing


AWS Lambda pricing is calculated on memory and duration used by our function. We can assign up to 10GB of memory to a Lambda function, by default it's set to 128MB. AWS Lambda also provides a free tier which includes one million free requests and 400,000 GB-seconds of computing time per month. You can get full details for AWS Lambda Pricing here or you can use the AWS pricing calculator.

Limitation of AWS Lambda


Some of the Cons/disadvantages of AWS Lambda are given below:

  • Lambda is not suitable for small projects.

  • By default, memory is used to


Create AWS Lambda Function


Please check out our previous post "How to Send SMS with AWS SNS using Lambda & Python". In this, you got the complete exposure of creating Lambda function and also about the AWS SNS (Simple Notification Services).

Conclusion


In this article, we are discussing "Basic Understanding on AWS Lambda". Hope you like this article, We will discuss more on Lambda in our future articles. Such as Lambda Versioning, Lambda Alias, and many more. Please feel free to add your comments if any queries or send your feedback.

Keep learning & stay healthy :)



You may like:


How to Setup AWS Pinpoint (Part 1)


How to Upload File to AWS S3 Bucket Laravel


How to Create AWS IAM User with Programmatic Access


How to Upload File to AWS S3 Bucket Laravel

Comments

Popular posts from this blog

Basic Use of Model Factories in Laravel

In this article, we will discuss the basic use of Model Factories in Laravel. Laravel comes with the feature called model factories that are offered to made fake models quickly. It’s used in the database testing and database seeding. Let’s start the discussion on this feature by... Read out the full post at here

How to Manage Elastic IP in AWS?

In this article, we will discuss "How to Manage Elastic IP in AWS?" . Here, you will learn the use of Elastic IP addresses and how to assign it to your EC2 Instance. If you are new with EC2 Instance then check out my previous article, "How to setup an EC2 Instance on AWS" . EC2 (Amazon Elastic Compute Cloud) provide us an ability to create, start, stop and terminate the instance at any time. This will creates a challenge with IP addresses, because restarting an instance or replacing a terminated instance with newly created instance, will result in a new IP address. Now the question is "How to reference a machine when the IP is constantly change?" . We can handle this situation with the use of Elastic IP address. We can associate a single Elastic IP address to different Ec2 Instances. You can immediately associate a new Ec2 Instance with the Elastic IP address if the EC2 instance is stopped or terminated. After the back-end EC2 instance changes, our exist...

How to use trackBy in Angular with Example

In this article, we will discuss "How to use trackBy in Angular" . Basically, " trackBy " is used to improve the performance of an angular application. Today, I will try to explain the use of trackBy with an example. Why do we need trackBy in Angular? By default, no need to use trackBy in Angular. But with large collections of data, angular ngFor directive may perform poorly. For example, a small change of data such as adding a new record, editing, or deleting a record from the collection. The angular framework will remove all the DOM elements that are associated with the data and will create them again in the DOM tree even if the same data is coming. Here, a lot of DOM manipulation will happen in the background if a large amount of data comes from the API then the application performance will suffer. Angular trackBy example Angular provides us function trackBy which helps us to track the items which have been added or deleted. The trackBy function takes two argum...