【Table of contents】
-
1. Introduction
AWS Lambda is one of the most heavily used and excellent services available on AWS, the world's most used cloud, and it's a serverless FaaS (Function as a Service). First, let's take a look at what FaaS and serverless mean.
-
a) What is FaaS?
FaaS is one of the forms of cloud usage. There are two types of cloud usage: IaaS (Infrastructure as a Service) that uses a server through the Internet, and SaaS (Software as a Service) that uses an application. FaaS is a form of cloud usage that defines and executes processes created by programming via the Internet.
-
b) What is serverless?
Serverless means, literally, that you don't need a server. Until now, web services and other services have been provided by buying a server, buying and installing middleware on top of it, and running applications on top of it. Therefore, in order to operationally manage Web applications, servers and middleware also had to be operationally managed. However, "serverless" means that both the middleware and the server are managed by a cloud service provider such as AWS. This means that people who want to create a web application will only need to create the application and program code, and they will be able to publish the web application.
-
c) What is AWS Lambda?
As we mentioned earlier, AWS Lambda is a "serverless FaaS". To recap, AWS Lambda is a service as following.
・A service in which programs are defined in the cloud and can be executed over the Internet
・AWS manages the server and middleware, so you only need to think about the program.Let's take a look at the screen where the function is actually defined. You can write a function to execute as shown in the following screen and execute it at any time you want. It's easier to picture it by looking at the actual screen.
-
-
2. Benefits of AWS Lambda
So, what makes AWS Lambda so good and why is it being used around the world? Let's take a closer look.
-
a) Design aspect
AWS Lambda has a very rich set of functions that can trigger execution. Let's take a look at the actual Lambda build screen and see what kind of things can be run triggers.
Please note that this is only a partial view.
In addition, it can be linked with S3 (storage service) and SNS (notification service). It can also work with third party services. For example, customer management services such as SugarCRM or monitoring services such as DataDog can be selected as execution triggers.
By the way, what are the benefits of having a rich selection of execution triggers? Simply put, applications are less relevant to each other, making it easier to improve services or reduce the extent of failures. The high relevance of applications to each other means that every time you improve your service, you have to do a lot of testing to make sure there are no applications that will stop working. This will cost you time and money. However, if the relevance of the applications is low, the application can be improved with fewer tests.
-
b) Architectural aspect
With AWS Lambda, you have a wide variety of programming languages to choose from. The following is the screen for actually selecting the programming language.
As you can see, it is possible to choose a programming language that is commonly used, such as Java or Ruby. If you want to use a programming language that isn't here, you can use a feature called "Custom Runtime". For example, you can use "custom runtime" to run the bash as a function of AWS Lambda.
You can also set up environment variables, timeouts, etc., although there is an upper limit. All settings related to application processing can be made.Therefore, it is safe to assume that there are no missing settings when constructing a function.
In addition, if the function you create is slow, you can easily tune and debug it, and the memory allocated to run the AWS Lambda function can be tuned in a few clicks. For debugging, AWS Lambda is connected to CloudWatch, an AWS monitoring service, so you can check the execution logs right away.
-
c) Operational advantages
What are some of the operational benefits of using AWS Lambda? The best part is that there are few failures. When running applications on a server, in addition to application failures, you have to be aware of server and middleware failures as well. If the server running your application is down in the middle of the night or on a holiday, you'll have to rush to the office. However, AWS Lambda is serverless, so you don't have to worry about that at all.
And the best thing about AWS Lambda is that it's cheap. Each month, 1,000,000 runs are available for free. It's not an exaggeration to say that it's almost free if you use it for personal use.
-
d) Plenty of ways to use
There are many ways to use AWS Lambda. Of course you can do what your application needs to do, such as data processing and file integration. You can also use this service for security-related processes such as authentication, access rights auditing, and log extraction, and if you want to keep down the usage fees for services such as EC2, you can use it for operational purposes such as stopping all EC2 when the usage fees exceed a certain level. Since the fees are overwhelmingly lower than using EC2, etc., let's use it for a variety of things according to your requirements.
-
-
3. Conclusion
You can think of AWS Lambda as a function store that can be used without a server. A wealth of development tools and settings are available. It can be used for all sorts of purposes, from data processing and authentication to automatic operation. In addition, the application can run stably because it is less prone to failure. Let's take advantage of AWS Lambda to create cheap and stable web applications.