Serverless Flashcards
AWS Lambda
Virtual function (no servers to manage)
- limited to short executions
- run on demand
- automated scaling
Lambda@Edge
Lambda functions deployed alongside CloudFront CDN
DynamoDB
Serverless NoSQL database with replication across 3 AZ
- made of tables with a primary key
DynamoDB – Provisioned Throughput
Read Capacity Units (RCU): throughput for reads ($0.00013 per RCU)
• 1 RCU = 1 strongly consistent read of 4 KB per second
• 1 RCU = 2 eventually consistent read of 4 KB per second
Write Capacity Units (WCU): throughput for writes ($0.00065 per WCU)
• 1 WCU=1 write of 1KB per second
DAX
DynamoDB Accelerator (DAX) is seamless cache for DynamoDB
DynamoDB Streams
Intercept changes in DynamoDB (Create, Update, Delete)
The stream be read by AWS Lamnbda
DynamoDB Transactions
All or nothing type of operations (Insert, Update & Delete)
DynamoDB On Demand
Scalable capacity planning (WCU / RCU)
- 2.5x more expensive
DynamoDB Global Tables
Automatic replication of DynamoDB cross region
DynamoDB Capacity planning
Planned capacity for WCU & RCU
API Gateway
Enables public RESTful endpoints to clients
API Gateway - Endpoint Types
- Edge-Optimized (default): For global clients
- Regional: One region
- Private: within a VPC
API Gateway - IAM Permissions
Allow permission of an endpoint their IAM permissions
- Leverages “Sig v4” capability where IAM credential are in headers
API Gateway - Lambda Authorizer
Uses AWS Lambda to validate the 3rd party auth tokens (OAuth/SAML) in header being passed
API Gateway - Cognito User Pools
Manages your own user pool (can be backed by Facebook, Google login etc…) and only helps with authentication not authorisation