ladderlore
  • S3 や IAM などのサービス名を入力してください。

概念

Serverless application patterns

Build with API Gateway, Lambda, DynamoDB and S3 so there are no servers to run, and know which limits push you to containers.

このレッスンはまだ翻訳されていないため、英語で表示しています。

A web backend (top) and a file pipeline (bottom) that end in the same table.
  • Run time

    Value
    30 minutes (older exams: 15)
    What to do
    Longer jobs: Fargate or Step Functions
  • Memory

    Value
    128 MB to 10,240 MB
    What to do
    CPU grows with memory
  • Synchronous payload

    Value
    6 MB
    What to do
    Larger data: pass an S3 link
  • API Gateway wait

    Value
    29 seconds by default
    What to do
    Slow work: make it asynchronous
  • Concurrency

    Value
    1,000 per Region by default (new accounts may start lower)
    What to do
    Request an increase, or reserve some
Limits that decide between Lambda and containers.

1 / 2

  • Run time

    Value
    30 minutes (older exams: 15)
    What to do
    Longer jobs: Fargate or Step Functions
  • Memory

    Value
    128 MB to 10,240 MB
    What to do
    CPU grows with memory
  • Synchronous payload

    Value
    6 MB
    What to do
    Larger data: pass an S3 link

2 / 2

  • API Gateway wait

    Value
    29 seconds by default
    What to do
    Slow work: make it asynchronous
  • Concurrency

    Value
    1,000 per Region by default (new accounts may start lower)
    What to do
    Request an increase, or reserve some
Limits that decide between Lambda and containers.

概要

Serverless means you run code and store data without managing servers. AWS adds capacity, replaces failed parts and spreads work across Availability Zones. You pay for what runs, and idle time costs almost nothing. Typical building blocks: AWS Lambda for code, Amazon API Gateway for the API, Amazon DynamoDB for data, Amazon S3 for files, Amazon SQS, Amazon SNS and AWS Step Functions to connect them, and AWS Fargate for containers.

概要

Three patterns cover most questions. A web or mobile backend: API Gateway calls Lambda, which reads and writes DynamoDB. A file pipeline: an upload to S3 starts a Lambda function that resizes or scans the file. A queue worker: SQS holds jobs and Lambda processes them in batches, scaling with the queue.

概要

Serverless has limits. A Lambda invocation runs at most 30 minutes now. Older exam guides say 15 minutes, so know both. An API Gateway call is cut at 29 seconds by default. Long jobs still do not fit, so use containers on AWS Fargate for them. Use Fargate too for a fixed runtime or a long-lived connection. Lambda is cheapest for spiky traffic. A steady, heavy load can cost less on containers or instances.

覚えること

  • No servers to patch or scale. You pay per request and per run time.
  • Backend pattern: API Gateway, Lambda, DynamoDB.
  • File pattern: an S3 event starts Lambda. Queue pattern: SQS feeds Lambda.
  • Lambda runs up to 30 minutes now (older exams say 15). Longer work goes to Fargate or Step Functions.

覚えること

  • API Gateway waits up to 29 seconds by default for the backend.
  • Spiky or unpredictable traffic fits serverless. Constant heavy load may cost less on containers.

試験では

  • “No servers to manage, and it must absorb unpredictable traffic” points to API Gateway, Lambda and DynamoDB.
  • “Process each image uploaded to S3” points to an S3 event notification that starts Lambda.
  • “A job runs for two hours” cannot run in one Lambda function: it points to AWS Fargate.