zoukankan      html  css  js  c++  java
  • [SAA + SAP] 07. Lambda

    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

    • Should be async invocation, so APi Gateway is NOT correct.
    • SQS no need for Lambda to setup DLQ

    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
  • 相关阅读:
    例2-3
    例2-2
    例2-1
    p14
    第一次作业
    例1-1
    第二次作业(2)
    第二次作业
    第三章3-3
    第三章3-2
  • 原文地址:https://www.cnblogs.com/Answer1215/p/15036708.html
Copyright © 2011-2022 走看看