Courseiva

DVA-C02 SQS visibility timeout Practice Question

A company is using AWS Lambda to process messages from an Amazon SQS queue. The Lambda function sometimes fails to process a message due to a transient error. The company wants to automatically retry failed messages up to 3 times, with a 5-minute delay between retries. What should the company configure?

⚠ Common exam trap

Candidates may think that the Lambda function's DLQ configuration controls retries, but in reality, for SQS-triggered Lambda, retries are managed by SQS's visibility timeout and redrive policy. The visibility timeout acts as the delay between retries.

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

✓

Configure the SQS queue with a delivery delay of 5 minutes and a redrive policy to move messages to a dead-letter queue after 3 receives.

For an SQS-triggered Lambda, retries are managed by SQS. To retry a failed message up to 3 times with a 5-minute delay between attempts, set the queue's visibility timeout to 5 minutes and configure a redrive policy with maxReceiveCount = 3 so the message is moved to a dead-letter queue after 3 failed receives. Note that a delivery delay only postpones the initial delivery of a message and does not create a delay between retries, so option D's 'delivery delay' is the wrong mechanism. Option A is incorrect because Lambda functions do not have a redrive policy; retries for SQS-triggered Lambda are managed by SQS. Option B is unnecessary overhead. Option C is invalid because reserved concurrency and a 'Retry attempts' setting do not control SQS-triggered Lambda retries.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Configure a dead-letter queue on the Lambda function with a redrive policy that allows up to 3 retries and a 5-minute delay.

    Why it's wrong here

    Incorrect. Lambda does not have a redrive policy for its DLQ. The DLQ is used to capture failed messages after retries are exhausted, but retries and delays are handled by SQS.

  • ✗

    Use AWS Step Functions to poll the SQS queue and implement a retry loop with exponential backoff.

    Why it's wrong here

    Step Functions would introduce an orchestration layer that polls SQS and manages retries, but the requirement specifies a fixed 5-minute delay between retries, not exponential backoff. Step Functions’ default retry policy uses exponential backoff with a variable delay, which cannot be configured to a constant 5-minute interval. This option is tempting because Step Functions excels at coordinating multi-step workflows with error handling, and would be correct if the scenario required dynamic backoff or conditional branching after retries.

  • ✗

    Set the Lambda function's reserved concurrency to 1 and enable the 'Retry attempts' option to 3 in the function configuration.

    Why it's wrong here

    Incorrect. Reserved concurrency and a 'Retry attempts' option in Lambda configuration do not apply to SQS triggers. Retries are controlled by SQS.

  • ✓

    Configure the SQS queue with a delivery delay of 5 minutes and a redrive policy to move messages to a dead-letter queue after 3 receives.

    Why this is correct

    Correct. Configuring the SQS queue with a redrive policy (maxReceiveCount = 3) moves messages to a dead-letter queue after 3 receives. The delay between retries is achieved by setting the visibility timeout to 5 minutes. The phrase 'delivery delay' in the option is not exactly correct, but it is the best choice.

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 DVA-C02 question from scratch — 1,135 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 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.