[SAA + SAP] 07. Lambda
阿新 • • 發佈:2021-07-21
SAA
- CPU is linked to RAM (cannot be set manually)
- 2 vCPU are allocated after 1.5G of RAM are used... if you are enabling multi thread, you cannot leverage 2 vCPU
SAP
- If you application need to response under 100ms, serverless articture is not good for you
- All the serverless techs you use, they will introduce some latencies and sums up
Security
- Lambda deploy in AWS outside VPC cannot talk to the RDS deployed in a VPC & Private subnet
- Solution is to deploy Lambda in VPC & Private subnet, then it can talk to RDS
- But will have problem to access public www
- Solution is to have a route to NAT in public subnet, and NAT has a route to IGW which can access www
- How about access DynamoDB which not in VPC
- Solution is to use VPC endpoint to access it
Synchronous Invocations
- CLI & SDK, wait for response
- Exponential backoff for retry
Asynchronous Invocation
- DLQ: for failed processing
Event Source Mappinp
- For stream
- Lambda poll the stream
- If error, will do retry until success
- idempotent
Destinations
- CodeDeploy can help to shift traffic for Lambda function