Serverless Flashcards
developers don’t have to manage servers anymore they just deploy code, functions
Serverless
- AWS Lambda
- DynamoDB
- AWS Cognito
- AWS API Gateway
- Amazon S3
- AWS SNS & SQS
- AWS Kinesis Data Firehose
- Aurora Serverless
- Step Functions
- Fargate
All serverless services
Virtual functions limited by time tthat run on-demand
Lambda
First 1,000,000 requests are free, $0.20 per 1 million requests thereafter
Lambda
Max execution time of a lambda function
15 minutes
A code that you write and attach to CloudFront distributions that runs close to your users to minimize latency
Edge Function
Lightweight functions written in JavaScript for high-scale, latency-sensitive CDN customizations that allow millions of requests/second with Sub-ms startup times
CloudFront Functions
functions written in NodeJS or Python that scales to 1000s of requests/second
Lambda@Edge
Does Lambda@Edge trigger from Origin Request/Response
Yes
CloudFront Functions vs. Lambda@Edge
- Cache key normalization
- Transform request attributes (headers,
cookies, query strings, URL) to create an optimal Cache Key
- Transform request attributes (headers,
- Header manipulation
- Insert/modify/delete HTTP headers in the request or response
- URL rewrites or redirects
- Request authentication & authorization
- Create and validate user-generated tokens (e.g., JWT) to allow/deny requests
CloudFront Functions
CloudFront Functions vs. Lambda@Edge
- Longer execution time (several ms)
- Adjustable CPU or memory
- Your code depends on a 3rd libraries (e.g., AWS SDK to access other AWS services)
- Network access to use external services for processing
- File system access or access to the body of HTTP requests
Lambda@Edge
By default, is your Lambda function
launched inside your own VPC?
No
Lambda must be configured to launch in the VPC by defining the VPC ID, the Subnets and the Security Groups
True
Lambda will create an ENI (Elastic Network Interface) in your subnets to be launched in your VPC
True
IImproves Lambda functions directly accessing your DB by by pooling and sharing DB
connections
RDS Proxy