MLS-C01 Data Engineering Practice Question
A company uses Amazon Kinesis Data Streams to ingest clickstream data. The stream has 8 shards. A Lambda function processes each record and writes to Amazon DynamoDB. The Lambda function sometimes fails due to DynamoDB write throttling, causing duplicate processing of records after retries. The data engineering team needs to ensure exactly-once processing semantics for the DynamoDB writes. What should the team do?
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
✓
Use DynamoDB conditional writes with the Kinesis sequence number as a unique attribute to make writes idempotent.
Using DynamoDB conditional writes with the Kinesis sequence number as a unique attribute ensures idempotency. When processing a record, the Lambda function can attempt a conditional write that only succeeds if an item with that sequence number does not already exist. If the write fails due to a condition check, it means the record was already processed, so the function can skip it. This achieves exactly-once semantics even if the same record is delivered multiple times due to retries. Option A is incorrect because an SQS FIFO queue between Kinesis and Lambda would add latency and complexity; Kinesis already provides ordering and at-least-once delivery, and using a FIFO queue does not guarantee that the Lambda function will not process the same record multiple times within its retry logic. Option B is incorrect because setting maximum retry count to 0 with a DLQ simply discards failed records after the first failure, which does not provide exactly-once processing; it results in at-most-once semantics and potential data loss. Option C is incorrect because increasing DynamoDB write capacity may reduce throttling but does not eliminate duplicate processing; the same record can still be retried and written multiple times if the function retries, leading to duplicate writes.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use an Amazon SQS FIFO queue between Kinesis and Lambda to deduplicate records.
Why it's wrong here
SQS FIFO provides exactly-once delivery but does not eliminate duplicates from retries within Lambda.
- ✗
Configure the Lambda event source mapping with a maximum retry count of 0 and a DLQ.
Why it's wrong here
This would drop records instead of ensuring exactly-once processing.
- ✗
Increase the DynamoDB write capacity units to avoid throttling.
Why it's wrong here
This reduces throttling but does not prevent duplicate processing of retried records.
- ✓
Use DynamoDB conditional writes with the Kinesis sequence number as a unique attribute to make writes idempotent.
Why this is correct
Conditional writes based on the sequence number ensure each record is written only once.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
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 →
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.