ladderlore
  • 输入服务名称,例如 S3 或 IAM。

概念 · 基于 SAA-C03

Transforming streaming data

Lambda settings for streams, Spark Structured Streaming and Flink, and windowed features.

本课尚未翻译,暂以英文显示。

你在Solutions Architect Associate中已学过

  • Lambda reads batches from Kinesis and SQS and runs your code.
  • A synchronous failure stops a shard until it succeeds or expires.
  • Concurrency limits how many functions run at once.
阅读Solutions Architect Associate课程
  • Batch size

    What it does
    Records per call
    Tip
    Larger means fewer calls
  • Batching window

    What it does
    Waits to fill a batch
    Tip
    Up to 5 minutes
  • Parallelization

    What it does
    Batches per shard at once
    Tip
    1 to 10, order kept per key
  • Bisect on error

    What it does
    Splits a failing batch
    Tip
    Isolates the bad record
Four Lambda stream settings.
Per record, no state?
Low latency windows?
Lambda
Flink
Spark streaming
yesnoyesno
Pick the stream tool by state and latency.

是什么

For stateless, per-record work, Lambda is the simplest transform. Its event source mapping has four settings that matter. Batch size sets the records per call. The batching window waits up to five minutes to fill a batch, which cuts invocations. The parallelization factor, 1 to 10, runs several batches from one shard at once and keeps order per partition key. Bisect on error splits a failing batch in two to isolate the bad record. Add a maximum record age, retry limit and an on-failure destination so one bad record cannot block a shard. Partial batch responses report only the failed records.

是什么

Firehose can run a Lambda transform before delivery. Lambda on SQS follows the same batch and window idea for queue messages. For work that needs state over time, use Spark Structured Streaming in an AWS Glue streaming job or on EMR: it reads Kinesis or Kafka in micro-batches and keeps a checkpoint location in S3. Use Managed Service for Apache Flink for event-by-event processing with low latency, event time and windows.

是什么

Windowed features are aggregates over a time window, such as the number of card payments in the last five minutes. Compute them in Flink or Spark, then write them to Feature Store for models to read. Lambda alone cannot keep a window across invocations without an outside store.

要记住

  • Lambda stream settings: batch size, batching window (up to 5 minutes), parallelization factor (1 to 10).
  • Bisect on error finds the bad record. Retry limit, record age and a failure destination keep a shard moving.
  • Glue streaming and EMR run Spark Structured Streaming in micro-batches.
  • Flink: low latency, event time, windows and state.

要记住

  • Windowed features go from the stream job to Feature Store.

考试中

  • “One bad record keeps blocking a Kinesis shard for a Lambda consumer” points to bisect on error, a maximum record age and an on-failure destination.
  • “Rolling counts over the last five minutes on a stream” points to Flink or Spark windows, not plain Lambda.
  • “Process one shard faster without adding shards” points to a higher parallelization factor.