DVA-C02 Development with AWS Services Practice Question
A Lambda function processes a batch of SQS messages. Which two configurations reduce duplicate or failed-message impact?
⚠ Common exam trap
Candidates often think setting visibility timeout to zero or disabling the DLQ simplifies processing, but in reality, these actions increase duplicate or failed-message impact by removing mechanisms that control reprocessing and isolate problematic messages.
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 visibility timeout longer than expected processing time
A visibility timeout longer than the expected processing time prevents other consumers from reprocessing a message while it is still being handled, reducing duplicates. Option D is correct because a dead-letter queue captures messages that repeatedly fail processing, allowing analysis and preventing them from blocking the queue, while partial batch response enables the function to return a list of failed message IDs so that only those messages become visible again, reducing reprocessing of successful ones.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Set visibility timeout to zero
Why it's wrong here
Setting the SQS visibility timeout to zero is detrimental for reliable message processing by a Lambda function. A zero-second timeout means that as soon as a message is received, it immediately becomes visible again to other consumers or subsequent Lambda invocations. This significantly increases the likelihood of duplicate processing for messages that take any non-zero time to process or fail, leading to potential data inconsistencies and inefficient resource utilization.
- ✓
Use a visibility timeout longer than expected processing time
Why this is correct
Utilizing an SQS visibility timeout that is longer than the expected message processing time is a fundamental best practice for reliable asynchronous processing. This ensures that once a Lambda function receives a message, it has sufficient exclusive time to process it successfully and delete it from the queue before it becomes visible to other consumers. This prevents duplicate processing attempts and ensures that each message is handled at least once without unnecessary retries by other instances.
- ✗
Disable the dead-letter queue
Why it's wrong here
Disabling the Dead-Letter Queue (DLQ) for an SQS queue is a poor practice for robust message processing architectures. Without a DLQ, messages that repeatedly fail processing after the maximum number of retries will be permanently lost from the system. This prevents any opportunity for manual inspection, debugging, or re-processing of problematic messages, leading to data loss and significantly hindering the ability to troubleshoot and recover from application errors.
- ✓
Configure a dead-letter queue and partial batch response where appropriate
Why this is correct
Configuring a Dead-Letter Queue (DLQ) is essential for capturing messages that fail processing after multiple retries, enabling operators to investigate and potentially re-process them, thus preventing data loss. Furthermore, implementing SQS partial batch responses allows a Lambda function to acknowledge successfully processed messages within a batch while reporting specific failures. This prevents the entire batch from being reprocessed due to a few problematic items, optimizing resource usage and reducing unnecessary retries and costs.
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 724 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 →
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.