Courseiva

DOP-C02 Incident and Event Response Practice Question

A DevOps engineer is configuring an AWS Lambda function that processes messages from an Amazon SQS queue. The function must handle transient failures gracefully and avoid reprocessing the same message multiple times. The engineer sets the maximum receives to 3 and configures a dead-letter queue (DLQ) for the source queue. After several days, the engineer notices that some messages are being processed more than once, even though they were successfully processed. What is the MOST likely cause of this issue?

⚠ Common exam trap

The trap here is focusing on idempotency as the cause of duplicate processing, when idempotency is a mitigation for duplicates, not the reason they occur.

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

✓

The SQS queue's visibility timeout is shorter than the Lambda function's execution time.

The most likely cause is that the SQS queue's visibility timeout is shorter than the Lambda function's execution time. When a Lambda function polls an SQS queue, it receives a batch of messages and each message becomes invisible for the duration of the visibility timeout. If the function takes longer than that timeout to process a message, the message becomes visible again and can be picked up by another Lambda invocation. This results in duplicate processing. To resolve this, set the visibility timeout to at least the function's timeout plus a buffer, and ensure the function is idempotent.

Answer analysis

Option-by-option breakdown

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

  • ✗

    The dead-letter queue is misconfigured, causing messages to be sent back to the source queue.

    Why it's wrong here

    A dead-letter queue is used to store messages that fail processing after the maximum number of receives. It does not send messages back to the source queue. If the DLQ were misconfigured, messages might be lost or sent to the wrong queue, but they would not be reprocessed from the source queue. The scenario describes messages being processed more than once, which is not a DLQ behavior.

  • ✓

    The SQS queue's visibility timeout is shorter than the Lambda function's execution time.

    Why this is correct

    If the visibility timeout is shorter than the time it takes for the Lambda function to process the message, the message becomes visible again in the queue before the function completes. Another Lambda invocation can then receive and process the same message, leading to duplicate processing. This is a common misconfiguration. The visibility timeout should be set to at least the function's timeout plus a buffer to prevent this. Even if the function eventually succeeds, the duplicate processing has already occurred.

  • ✗

    The Lambda function is not idempotent, so it processes the same message differently each time.

    Why it's wrong here

    While idempotency is important to handle duplicate messages gracefully, it does not cause duplicate processing. The issue is that messages are being received and processed more than once, which is a symptom of the message becoming visible again before the first processing completes. Lack of idempotency would mean that duplicate processing causes side effects, but it is not the root cause of the duplicates themselves.

  • ✗

    The Lambda function's timeout is set too low, causing it to fail and retry messages.

    Why it's wrong here

    A low timeout can cause the function to fail and the message to be retried, but the issue described is that messages are processed more than once even though they were successfully processed. If the function timed out, it would not have completed successfully, so the message would not be considered successfully processed. The duplicate processing of successful messages points to a different root cause, such as visibility timeout or idempotency issues.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

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

Courseiva writes every DOP-C02 question from scratch — 1,298 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint

This DOP-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 DOP-C02 exam.