- DevOps for Serverless Applications
- Shashikant Bangera
- 426字
- 2021-07-16 17:35:31
AWS Lambda
Amazon Web Services (AWS) were the first to launch a FaaS, or serverless, service in 2014, called Lambda. They are currently the leaders in this kind of serverless provision. AWS Lambda follow the event-driven approach. At the trigger of an event, Lambda executes the code and performs the required functionality, and it can automatically scale as the traffic rises, as well as automatically descale. Lambda functions run in response to events, such as changes to the data in an Amazon S3 bucket, an Amazon DynamoDB table change, or in response to an HTTP request through the AWS API Gateway. That's how Lambda helps to build the triggers for multiple services, such as S3 DynamoDB, and the stream data store in Kinesis.
So, Lambda helps developers only worry about the coding—the computing part, such as the memory, CPU, network, and space, is taken care of by Lambda automatically. It also automatically manages the patching, logging, and monitoring of functions. Architecturally, a Lambda function is invoked in a container, which is launched based on the configuration provided. These containers might be reused for subsequent invocations for functions. As the demand dies, the container is decommissioned, but this is all managed internally by Lambda, so users do not have to worry about it as they do not have any control over these containers. The languages supported by AWS Lambda functions are Node.js, Java, C#, and Python.
While building serverless applications, the core components are functions and the event source. The event source is the AWS service or custom application, and the Lambda function processes the events. The execution time for each Lambda function is 300 seconds.
Let's look at an example of how AWS Lambda actually works. In a photo-sharing application, people upload their photos, and these photos need to have thumbnails so that they can be displayed on the user's profile page. In this scenario, we can use the Lambda function to create the thumbnails, so that the moment the photo gets uploaded in the AWS S3 bucket, S3, which supports the events source, can publish the object-created events and invoke the Lambda function. The Lambda function code reads the latest photo object from the S3 bucket, creates a thumbnail version, and saves it in another S3 bucket.
In Chapter 3, Applying DevOps on AWS Lambda Applications, we will look at how we can create, run, and deploy Lambda functions in an automated way, and we will also monitor and perform root-cause analysis through logging.
- 30天自制操作系統
- Linux操作系統基礎
- PLC控制程序精編108例
- Linux Mint Essentials
- Haskell Financial Data Modeling and Predictive Analytics
- Windows Phone應用程序開發
- 高性能Linux服務器構建實戰:系統安全、故障排查、自動化運維與集群架構
- Python基礎教程(第3版)
- 8051軟核處理器設計實戰
- Linux內核設計的藝術:圖解Linux操作系統架構設計與實現原理
- Windows 7應用入門與技巧
- 一學就會:Windows Vista應用完全自學手冊
- RHCSARHCE 紅帽Linux認證學習指南(第7版)EX200 & EX300
- Kali Linux高級滲透測試(原書第3版)
- Linux操作系統