美文网首页
AWS Serverless

AWS Serverless

作者: Lyudmilalala | 来源:发表于2021-12-13 23:01 被阅读0次

    AWS Lambda

    Assign an execution role to the Lambda function.

    Push event model

    A third-party event occurs and invokes a Lambda to handle some tasks.
    The third-party event has the policy to allow invoke Lambda
    AWS Lambda provides the AddPermission API.

    Pull event model

    Lambda pull event source, and invoke functions when a event is detected.
    Trust policy allows Lambda to assume role (tracking role, StsAssume policy).

    AWS Step Functions

    Use JSON-based structured language to define your state machine
    Define a workflow called a state machine made up of states
    Each Order is an execution through this state machine
    Each state start with an input

    Advantages

    • Build applications easily
    • Scale and recovery reliably
    • Adaptive

    Ways to trigger a step function

    • Call StartExecution through the AWS Step Function API
    • HTTPS/AJAX calls intercepted by the API Gateway
    • CloudWatch Events rule (scheduled or based on cloud events)

    API Gateway

    Endpoints types

    Edge-optimized API Endpoints

    An edge-optimized API endpoint is best for geographically distributed clients. API requests are routed to the nearest CloudFront Point of Presence (POP). This is the default endpoint type for API Gateway REST APIs.

    Any custom domain name that you use for an edge-optimized API applies across all regions.

    Regional API Endpoints

    A regional API endpoint is intended for clients in the same region. When a client running on an EC2 instance calls an API in the same region, or when an API is intended to serve a small number of clients with high demands, a regional API reduces connection overhead.

    For a regional API, any custom domain name that you use is specific to the region where the API is deployed. If you deploy a regional API in multiple regions, it can have the same custom domain name in all regions.

    Private API Endpoints

    A private API endpoint is an API endpoint that can only be accessed from your Amazon Virtual Private Cloud (VPC) using an interface VPC endpoint, which is an endpoint network interface (ENI) that you create in your VPC.

    相关文章

      网友评论

          本文标题:AWS Serverless

          本文链接:https://www.haomeiwen.com/subject/fufpgltx.html