[AWS Beginners] Learn AWS Lambda in 5 minutes!

Hello!
I'm Inoue, a Persian cat from Beyond Co., Ltd.'s Shikoku office.

Today, we will explain Lambda, one of the most popular AWS services

What is Lambda?

Lambda is a service that enables serverless operations.
AWS provides an environment in which programs can be executed serverlessly.
Serverless does not mean "no servers," as the name suggests.
While servers do exist, AWS handles the construction and maintenance of those servers
, freeing users from the hassle of building and maintaining them. There's no need to manage servers at all.
Normally, developing and running programs
requires preparing servers and keeping those servers and instances running to run the programs.
However, Lambda provides the above-mentioned environment in advance.
This allows users to focus on program development without worrying about server management.

Additionally, since usage fees are charged only when the program is running, Lambda can be used with minimal costs.
This is an advantage over resident servers.
Lambda employs efficient millisecond-by-millisecond billing.
This means that you are charged for every millisecond your function executes.
Functions can be used free of charge up to 400,000 per second per month.
However, the free time frame varies depending on the memory allocated to your Lambda function. While
you are charged for the number of requests, you can use up to 1 million requests per month for free.
There is no charge for creating Lambda or for idle time when Lambda is not running.
AWS Lambda Pricing
Because you are charged based on the number of Lambda requests and the execution time of your functions, the

Furthermore, because Lambda operates in multiple availability zones within a region,
it is able to provide high availability and fault-tolerant operational performance.
There is no scheduled downtime or server outages, enabling excellent service delivery.
This means high availability and fault tolerance are maintained without users even noticing.

Lambda is a mechanism that automatically processes data and requests in real time and backend processing.
Lambda automatically executes pre-defined processes when some event occurs. Lambda
can be easily executed by simply selecting the runtime of the program you want to run and uploading the source code.
Lambda supports common languages,
so you don't need to learn a special language to use it; you can start using Lambda right away with a language you're familiar with.
Language support is increasing every year and is expected to continue to grow.
The languages ​​currently supported by Lambda are as follows:

  • C#
  • PowerShell
  • Go
  • Java
  • Node.js
  • Python
  • Ruby

If you want to use a language other than those listed above, you can use the custom runtime function.
Lambda functions are stored in the Lambda service. They are executed
on specific AWS resources when a trigger occurs.
For example, if you upload an image to an S3 bucket, this triggers Lambda to resize the image and convert it into an image suitable for websites.
A thumbnail creation function is called, allowing you to automatically create thumbnails.

■Service that invokes Lambda

The service from which Lambda reads events Kinesis, DynamoDB, SQS
A service that invokes Lambda functions synchronously ELB, ALB, Cognito, Lex, Alexa, API Gateway, CloudFront, Kinesis Data Firehose
A service that invokes Lambda functions asynchronously S3, SNS, SES, CloudFormation, CloudWatch Logs, CloudWatch Events, CodeCommit, Config

By using Lambda effectively, you can create stable web applications at low cost

Integration with AWS services

For example, Lambda can be triggered by the following events:

  1. At a specific time (CloudWatch Events)
  2. When data is uploaded to S3
  3. When a new item is written to DynamoDB
  4. When an Auto Scaling action is executed
  5. When a button is pressed on a web page
  6. When the API is called
  7. When you say, "Alexa, tell me about ____"

In this way, Lambda makes it easy to automate AWS processes

No need to manage servers

As mentioned above, Lambda is serverless and does not require server management.
This frees you from server operations and allows you to focus on developing your program code. It also
eliminates the need for server management, such as:

  • Operating System Updates
  • Applying security patches
  • Adding Disk Space
  • Operating system and middleware maintenance
  • Redundancy and failure recovery
  • Ensuring scalability
  • Designing for Disability
  • Retry when an execution error occurs
  • Consideration of jobs being concentrated at specific times

Additionally, Lambda does not execute processes unless it receives an execution instruction, such as a request or trigger.
Unlike a resident server, it does not need to continue running while waiting for a request or trigger.
Code is executed only when a request or trigger occurs.
If two requests occur simultaneously, both Lambda functions will execute simultaneously.
As the number of requests increases, the number of Lambda function executions also increases. However
, Lambda automatically ensures scalability without the need for Auto Scaling.
This means that Lambda functions are horizontally scaled according to the number of requests, executing in parallel.
This eliminates the need to configure Auto Scaling.
By default, the number of concurrent Lambda function executions for the entire account is limited to 1,000. However,
if you need more than 1,000, you can request an increase in the number of concurrent executions.
Additionally, you can set a maximum concurrent execution limit for each Lambda function.

Finally

This time, I've given you a quick 5-minute explanation of Lambda! What do you think?
I think it's great that you're charged when an event or trigger is executed, and there's no charge for idle time!
Another great thing about Lambda is its high fault tolerance and availability. Less
likely to fail means your applications can run stably.
Every time I write a blog about AWS, I understand why the AWS cloud is so popular.

I would like to continue blogging about AWS services in a general way, so I would be happy if you would read it

Growing every day, progressing every day.
I have to update myself every day!!!
Thank you for reading to the end.

If you found this article useful, please click [Like]!
2
Loading...
2 votes, average: 1.00 / 12
4,717
X Facebook Hatena Bookmark pocket

The person who wrote this article

About the author

Ayaka Inoue

I'm a member of the System Solutions Department.
I joined Beyond as one of the founding members of the Shikoku office. I jumped into the IT industry with no experience.
As part of the education team, I create curriculum and conduct training for new graduates, mid-career hires, and existing members.
My main job is server operation and maintenance.
Above all, I care about our customers' content.
I'm also a member of the Web Content Division and YouTube team.