Courseiva
Data EngineeringhardMultiple ChoiceObjective-mapped

MLS-C01 Data Engineering Practice Question

A company runs a real-time recommendation system that uses Amazon SageMaker endpoints for inference. The system ingests user activity data from a mobile app via Amazon API Gateway and AWS Lambda, which writes events to an Amazon Kinesis Data Stream. A second Lambda function consumes the stream, calls a SageMaker endpoint to generate recommendations, and stores the results in Amazon DynamoDB. The system has been working well, but recently the team noticed an increase in latency from the time a user action occurs to when the recommendation is stored. The SageMaker endpoint shows increased invocation latency but no throttling. CloudWatch metrics show that the Kinesis stream's IteratorAgeMilliseconds is increasing, indicating the consumer is falling behind. The Lambda consumer's duration is within limits, but the number of invocations is lower than expected. The team suspects the issue is with the event source mapping. Which course of action should the team take to reduce the latency?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Increase the batch size in the event source mapping to process more records per invocation.

The increasing IteratorAgeMilliseconds indicates the consumer is falling behind. The Lambda consumer's duration is within limits but the number of invocations is lower than expected, suggesting that the event source mapping is not invoking the function often enough. Increasing the batch size allows each invocation to process more records per invocation, effectively increasing throughput without requiring more invocations. This directly addresses the lag. Option B (increase shards) could help if the consumer had sufficient concurrency, but the root cause is low invocations per shard, not lack of shards. Option C (decrease reserved concurrency) would worsen the problem. Option D (Firehose) does not solve the consumer lag and changes the architecture unnecessarily.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Increase the batch size in the event source mapping to process more records per invocation.

    Why this is correct

    Larger batches improve throughput by reducing overhead per invocation.

  • Increase the number of shards in the Kinesis data stream to increase parallelism.

    Why it's wrong here

    The consumer is already falling behind; more shards would require more Lambda concurrency but the event source mapping may be limiting.

  • Decrease the Lambda function's reserved concurrency to force it to scale down.

    Why it's wrong here

    Reducing concurrency would increase lag.

  • Replace the Lambda consumer with an Amazon Kinesis Data Firehose delivery stream.

    Why it's wrong here

    Firehose is for near-real-time delivery, not for calling SageMaker endpoints.

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

About these practice questions

One of 1,672 original MLS-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This MLS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MLS-C01 exam.