‹ All MLA-C01 questions

MLA-C01 Practice Question 83: Kinesis Lambda Consumer Lag

AWS Certified Machine Learning Engineer – Associate (MLA-C01) · Test 9 · question 3 of 10

Data Preparationhard

An AWS Lambda function reads an Amazon Kinesis data stream through an event source mapping, enriches each event, and writes features to SageMaker Feature Store one record at a time. The stream has four shards and belongs to another team, so the shard count cannot change. During peak hours the stream's IteratorAge climbs to 40 minutes. The function is the stream's only consumer, it is never throttled, its concurrent executions stay at four, its duration per batch is steady, and events must stay in order per partition key.

What should the engineer change to reduce the lag?

Select one answer
Show answer and explanation

Answer:

  • D. Set the event source mapping's parallelization factor to 10, so that Lambda processes several batches from each shard at the same time

By default Lambda processes each shard's records in order, one batch at a time, which is why concurrency sits at exactly four, one per shard. The ParallelizationFactor setting (up to 10) lets Lambda process one shard with several invocations at once while still keeping records in order per partition key. With a factor of 10, the function can run up to 40 batches at a time, so throughput rises without touching the shard count (option D).

- A is wrong because the function writes records one at a time. A batch that is 10 times larger takes about 10 times longer, so records per second stay about the same. - B is wrong because concurrency is not the limit: the function is never throttled. With one batch per shard, Lambda never tries to run more than four invocations, so reserving 100 changes nothing. - C is wrong because enhanced fan-out helps when several consumers compete for a shard's shared read throughput. This function is the only consumer, and the delay is in processing, not in reading.

Reference: Using Lambda to process records from Amazon Kinesis Data Streams

Practice Test 9 ›

Study guides for MLA-C01