Courseiva

DVA-C02 Development with AWS Services Practice Question

A developer is building a serverless application using AWS Lambda that processes messages from an Amazon SQS queue. The queue receives about 100 messages per second, and each message takes about 30 seconds to process. The Lambda function is configured with a reserved concurrency of 10. The developer notices that messages are frequently being sent to the dead-letter queue (DLQ) after three failed processing attempts. The Lambda function's execution role has the necessary permissions to read from the SQS queue and write to the DLQ. The SQS queue's visibility timeout is set to 60 seconds, and the Lambda function's timeout is set to 60 seconds. What is the most likely cause of the messages being sent to the DLQ?

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 reserved concurrency of 10 is too low to handle the incoming message rate, causing messages to be repeatedly retried until they exceed the maxReceiveCount.

With a reserved concurrency of 10, the Lambda function can process at most 10 messages concurrently. Since each message takes 30 seconds, the maximum throughput is about 10 messages per 30 seconds = ~0.33 messages per second, far below the incoming rate of 100 messages per second. Messages that are not processed will become visible again after the visibility timeout (60 seconds). They will be retried, but due to the low concurrency, they will likely fail again, eventually exceeding the maxReceiveCount (default 3) and being sent to the DLQ. Option A is incorrect because long polling reduces empty responses but does not address the throughput limitation. Option C is incorrect because the 60-second timeout is sufficient for 30-second processing. Option D is incorrect because the DLQ triggers after the maxReceiveCount, not after the first attempt.

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 SQS queue is not configured to use long polling, causing the Lambda function to receive empty responses and waste time.

    Why it's wrong here

    Long polling on an SQS queue primarily optimizes efficiency by reducing the number of empty ReceiveMessage calls and associated costs. While not using long polling can lead to the Lambda function receiving more empty responses and wasting some polling time, it does not directly cause messages to fail processing or be repeatedly retried to the point of exceeding maxReceiveCount. Message retries and maxReceiveCount issues typically stem from processing failures, timeouts, or concurrency limitations, not the polling mechanism itself.

  • ✓

    The reserved concurrency of 10 is too low to handle the incoming message rate, causing messages to be repeatedly retried until they exceed the maxReceiveCount.

    Why this is correct

    A reserved concurrency of 10 means the Lambda function can only process 10 messages concurrently at any given time. If the incoming message rate from SQS significantly exceeds this limit, new Lambda invocations will be throttled. Messages that cannot be processed immediately will remain in the SQS queue, their visibility timeout will expire, and they will become visible again for another processing attempt. This cycle of retries continues, incrementing the ReceiveCount for each message, until the maxReceiveCount defined in the SQS queue's redrive policy is exceeded, at which point the message is moved to the Dead-Letter Queue.

  • ✗

    The Lambda function timeout is too short for the processing time required.

    Why it's wrong here

    The Lambda function timeout is set to 60 seconds, which is ample time for a task requiring only 30 seconds of processing. A function timeout error would only occur if the processing time exceeded 60 seconds, causing the invocation to fail and the message to be returned to the SQS queue. Since the required processing time is well within the configured timeout, the function is not failing due to insufficient execution time, thus ruling out this option as the cause for messages exceeding maxReceiveCount.

  • ✗

    The DLQ is incorrectly configured to receive all failed messages after the first attempt.

    Why it's wrong here

    The Dead-Letter Queue (DLQ) is typically configured with a RedrivePolicy on the source SQS queue, which includes a maxReceiveCount attribute. This attribute specifies the number of times a message can be received by consumers before it is moved to the DLQ. The problem implies messages are being repeatedly retried until they exceed maxReceiveCount, indicating that the DLQ is not configured to receive messages after the first attempt. If it were, the maxReceiveCount would effectively be 1, contradicting the scenario of multiple retries.

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

This DVA-C02 question is part of Courseiva's 1,135-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.