A growing number of companies are building FaaS (function as a service), which uses cloud services to execute program code serverless. Using FaaS-based cloud services eliminates the need for developers to build and manage execution environments such as virtual machines and containers, contributing to speeding up development. Since it is a system that releases IT resources as needed after the execution of the code is completed, the fee is relatively low and it also leads to cost reduction.
The representative FaaS-based cloud service is the event-driven code execution service “AWS Lambda” of Amazon Web Services (AWS). When a developer creates and registers code and specifies an event such as writing a file to a specific object storage bucket, the execution environment will be launched and the code will be executed when that event occurs.
AWS Lambda was initially limited to a maximum of 5 minutes for function execution, and was often used to execute code that completed processing in a short time, such as inter-service coordination. However, in 2018, with the extension of the maximum execution time of Lambda functions to 15 minutes, the scope of application has expanded to relatively complex processing.
At the annual event “AWS re:Invent 2022”, which was held from late November 2022, AWS introduced fast startup options for Lambda functions (execution instances loaded with code), and the execution and execution of processing flows mainly composed of Lambda functions. We announced a significant increase in the number of parallel processes in the management service “AWS Step Functions”. The number of parallel processing has been increased from the conventional 40 to 10,000. As a result, it is expected that the scope of application of AWS Lambda will be further expanded.
In the following, we will explain the advantages and key points of FaaS construction on the cloud, including examples of AWS Lambda utilization by NTT DoCoMo.
Expected to improve development speed and reduce costs
There are two major advantages of building FaaS on the cloud. One is to eliminate the trouble of managing the execution environment such as the server. Another is reducing cloud costs.
With the spread of the cloud, many companies are migrating their on-premises (in-house owned) servers to the cloud. In the case of AWS, by using the virtual machine Amazon EC2, developers can immediately use a virtual machine with an OS (basic software) installed. On the other hand, OS maintenance, application of security patches, installation and configuration of middleware must be performed by developers.
By adopting container services such as Amazon ECS/EKS, container images can be managed with runtimes and libraries included, but processing such as starting and stopping containers must basically be managed by the developer.
On the other hand, AWS Lambda does not require management of virtual servers or containers. If there is no need to manage servers and containers, “human resources can be allocated to application development” (Masato Kobayashi, General Manager, Technology Promotion Group, Technology Management Headquarters, Amazon Web Services Japan). It is essential to improve the speed of system development and improvement for DX (digital transformation). The advantage of eliminating the hassle of building and managing servers and containers is significant.
FaaS construction is also effective in reducing cloud costs. FaaS-based cloud services such as AWS Lambda are basically pay-as-you-go based on code execution time.