AWS LAMBDA: Everything You Should Know

What is Serverless?

To understand what AWS Lambda is, let’s first learn about serverless architecture. Serverless architecture is a way to build and use apps and services without worrying about handling infrastructure. Even though your app still runs on servers, you don’t have to deal with setting up the server’s operating system, fixing issues, or making them bigger when needed.

Serverless apps or platforms have four main features:

  • No server management is required.
  • Scalability is flexible and automatic.
  • No need to pay for idle resources.
  • High availability is built-in.

Introduction to Lambda

Lambda is a tool that helps you run code without needing to set up or take care of servers. It uses a strong and reliable computer system, and it handles everything related to the computer, like maintaining the server, making sure it has enough power, and adjusting its size based on need. It also keeps an eye on your code and records what happens. With Lambda, you can use code for nearly any kind of app or service. You just have to provide your code in one of the languages that Lambda knows.

Why Choose AWS Lambda?

Easy Serverless Setup:

AWS Lambda handles everything in its system, so you don’t need to worry about things like updating machines or dealing with network problems. This gives you more time to focus on your actual application instead of dealing with these technical details.

Freedom to Code:

Since AWS Lambda is fully managed, it can save you time by handling operational tasks for you. When you don’t have to manage the infrastructure, you can spend more time writing your application’s code. But keep in mind, this also means you won’t have as much control over the infrastructure.

Pay for What You Use:

With Lambda, your code runs only when it’s needed, and it can automatically adjust to handle more work. You only pay for the time your code actually uses, so you’re not charged when your code isn’t running.

Check Your Performance:

AWS Lambda watches over your functions and sends data about how they’re doing to Amazon CloudWatch. This information is shown in graphs on the Lambda console, so you can keep an eye on how things are going.

How Lambda works:

  1. Firstly, upload your code to ‘Lambda’ in one or more lambda functions.
  2. AWS Lambda will then execute the code on your behalf
  3. After the code gets invoked, lambda automatically takes care of provisioning and managing the required servers.

Features of Lambda:

Function – This is like a small computer program that AWS Lambda runs. It gives tasks to the function, and the function does them and gives back an answer.

Code – This is the set of instructions you put in the lambda function to make it work.

Runtime – The runtime is like the tool that runs your function. It helps your function work properly. Some of the main runtimes are listed below.

Handler – This is like the button your runtime presses when your function starts.

Tags – Tags are like labels that stick to your function, helping you remember what it’s for.

Description – Description is like writing a few sentences to explain what your function does.

Timeout – Timeout is the longest time your function is allowed to work. After that, it has to stop.

Layers – Lambda layers help you share extra stuff like libraries with your function.

Log Streams – Lambda keeps an eye on your function and counts how many times it works. It also looks at how long it takes and if it has any problems.

  • Invocations – The number of times the function got invoked.
  • Duration – The average, minimum, and maximum execution times.
  • Error count and success rate (%) – The number of errors and the percentage of executions that got completed without error.

Limits in Lambda?

  • Lambda gives you up to 512 MB of space to use.
  • While your function works, it can use between 128 and 3008 MB of memory.
  • Your function can’t work for more than 900 seconds (which is 15 minutes). Normally, it’s set to 3 seconds.
  • You can only use the languages that are available in the lambda editor.

Conclusions

When you create applications without worrying about servers using AWS, it makes things easier. AWS Lambda is like a smart helper for your apps. It helps you work faster on your app’s special parts. AWS also offers other helpful things for building strong, fast, and safe apps without needing to worry about the servers.

With AWS Lambda, you can work on your app and not think about servers and tech stuff. But there are some rules. Your code can only run for 15 minutes at most. Also, you can’t pick the types of servers you want. Lambda chooses the best ones for your needs. Remember, AWS Lambda is for your app’s inside work, not everything else.

for more details https://docs.aws.amazon.com/lambda/

Leave a Comment