What’s serverless?
• Serverless is a new paradigm in which the developers don’t have to manage servers anymore…
• They just deploy code
• They just deploy… functions!
• Initially… Serverless == FaaS (Function as a Service)
• Serverless was pioneered by AWS Lambda but now also includes anything that’s managed: “databases, messaging, storage, etc.”
• Serverless does not mean there are no servers… it means you just don’t manage / provision / see them
Serverless in AWS
• AWS Lambda
• DynamoDB
• AWS Cognito
• AWS API Gateway
• Amazon S3
• AWS SNS & SQS
• AWS Kinesis Data Firehose
• Aurora Serverless
• Step Functions
• Fargate
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-130.png)
Why AWS Lambda
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-131.png)
• Limited by RAM and CPU
• Continuously running
• Scaling means intervention to add/remove servers
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-132.png)
• Limited by time – short executions
• Run on-demand
• Scaling is automated!
Benefits of AWS Lambda
• Easy Pricing
• Pay per request and compute time
• Free tier of 1,000,000 AWS Lambda requests and 400,000 GBs of compute time
• Integrated with the whole AWS suite of services
• Integrated with many programming languages
• Easy monitoring through AWS CloudWatch
• Easy to get more resources per functions (up to 1OGB of RAM!)
• Increasing RAM will also improve CPU and network!
AWS Lambda language support
• Node.js (JavaScript)
• Python
• Java (Java 8 compatible)
• C# (.NET Core)
• Golang
• C# / Powershell
• Ruby
• Custom Runtime API (community supported, example Rust)
• Lambda Container Image
• The container image must implement the Lambda Runtime API
• ECS / Fargate is preferred for running arbitrary Docker images
AWS Lambda Integrations Main ones
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-133.png)
Example: Serverless Thumbnail creation
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-134.png)
Example: Serverless CRON Job
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-135.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-137.png)
https://us-east-1.console.aws.amazon.com/lambda/home?region=us-east-1#/begin
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-138.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-139.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-140.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-141.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-142.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-144.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-145.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-146.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-147.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-148.png)
Và bạn có thể view code trên lambda..
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-149.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-150.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-152.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-153.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-154.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-155.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-156.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-162.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-158.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-159.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-160.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-161.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-163.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-164.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-165.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-166.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-167.png)
Cancel disable Lambda.
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-168.png)
![](https://nimtechnology.com/wp-content/uploads/2022/09/image-169.png)