Courseiva

DVA-C02 Development with AWS Services Practice Question

A company runs a critical application on AWS Lambda that processes real-time data from Kinesis Data Streams. The function is idempotent, but occasionally duplicate records are processed due to retries. The company wants to ensure exactly-once processing. Which approach should the developer implement?

⚠ Common exam trap

Candidates often assume SQS FIFO queues guarantee exactly-once processing end-to-end, but they overlook that Kinesis itself does not provide exactly-once delivery, so duplicates can still originate from the stream before reaching the queue.

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 a DynamoDB table to store processed record IDs and perform deduplication in the Lambda function.

DynamoDB provides a scalable, low-latency store for tracking processed record IDs, enabling the Lambda function to check for duplicates before processing. Since the function is idempotent but retries cause duplicates, a DynamoDB-based deduplication layer ensures exactly-once semantics without altering the event source or introducing ordering constraints.

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 SQS FIFO queue between Kinesis and Lambda.

    Why it's wrong here

    Using an SQS FIFO queue between Kinesis and Lambda is not a viable architecture because Kinesis Data Streams do not offer a direct integration to push records to SQS queues. An intermediary service or custom application would be required to read from Kinesis and write to SQS. Therefore, this proposed solution is fundamentally flawed and cannot be implemented as described to achieve deduplication.

  • ✓

    Use a DynamoDB table to store processed record IDs and perform deduplication in the Lambda function.

    Why this is correct

    Implementing a deduplication mechanism within the Lambda function using a DynamoDB table is the standard and most effective approach for achieving exactly-once processing semantics from Kinesis. The Lambda function can store a unique identifier for each processed record (e.g., a combination of Kinesis shard ID and sequence number) in a DynamoDB table. Before processing a new record, the function checks if its ID already exists in DynamoDB; if so, it skips processing, ensuring that even if Kinesis retries delivery, the record's side effects occur only once.

  • ✗

    Enable Lambda reserved concurrency to limit retries.

    Why it's wrong here

    Enabling Lambda reserved concurrency limits the maximum number of concurrent executions for a specific function, preventing it from consuming excessive resources or being throttled. While useful for resource management and preventing downstream service overload, it does not inherently prevent duplicate processing of records from a Kinesis stream. Retries from Kinesis, due to transient failures or checkpointing issues, can still lead to the same record being processed multiple times by different invocations, irrespective of concurrency limits.

  • ✗

    Reduce the batch size in the event source mapping.

    Why it's wrong here

    Reducing the batch size in the event source mapping for Kinesis only changes the number of records processed per Lambda invocation. While a smaller batch size might reduce the amount of work lost if an invocation fails, it does not eliminate the root cause of duplicates, which is Kinesis's at-least-once delivery guarantee and subsequent retries. If a batch fails after partial processing, Kinesis will re-deliver the entire batch, potentially leading to records being processed again, regardless of the batch's size.

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,135 original DVA-C02 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 DVA-C02 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 DVA-C02 exam.