Courseiva
Question 190 of 724
Troubleshooting and OptimizationeasyMultiple ChoiceObjective-mapped

DVA-C02 Troubleshooting and Optimization Practice Question

A developer reports that an AWS Lambda function is timing out after 3 seconds. The function reads from an Amazon SQS queue. What is the most likely cause?

⚠ Common exam trap

Test-takers frequently confuse timeout with memory or permissions issues, but the exact 3-second timeout is a direct indicator of the default Lambda timeout being too low, not a resource or authorization problem.

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 Lambda function timeout is set to 3 seconds, which is too low.

The Lambda function is timing out after exactly 3 seconds because its configured timeout is set to 3 seconds, which is too low for the workload. Lambda has a maximum execution timeout of 15 minutes (900 seconds), but the default timeout is 3 seconds. Since the function reads from an SQS queue, it likely needs more time to process messages, and increasing the timeout value will resolve the issue.

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 Lambda function memory is set too low, causing slow execution.

    Why it's wrong here

    While insufficient memory can lead to increased execution duration due to CPU throttling or excessive garbage collection, it typically results in variable execution times or out-of-memory errors, not a consistent, hard timeout at exactly 3 seconds. A consistent timeout at a specific duration strongly suggests the explicit timeout setting is being hit, rather than a general performance bottleneck.

  • The Lambda function timeout is set to 3 seconds, which is too low.

    Why this is correct

    AWS Lambda functions have a configurable timeout setting, with a default value of 3 seconds. If the function's execution logic, including any external API calls or complex processing, exceeds this configured duration, Lambda will forcibly terminate the invocation and report a timeout error. This is a common and direct cause for consistent timeouts occurring at a specific, short duration.

  • The Lambda execution role lacks permissions to poll SQS.

    Why it's wrong here

    If the Lambda function's execution role lacked the necessary `sqs:ReceiveMessage` or `sqs:DeleteMessage` permissions to interact with an SQS queue, the invocation would fail with an `AccessDeniedException` or similar permission-related error. These are distinct from a timeout error, which indicates the function ran for its maximum allowed duration before completion, not that it was denied access.

  • The SQS queue is empty, causing the function to wait indefinitely.

    Why it's wrong here

    When a Lambda function is triggered by an SQS event source mapping, it processes messages available in batches. If the SQS queue is empty, the event source mapping simply won't invoke the Lambda function, or the function will complete quickly if invoked with an empty batch. It will not cause the function to wait indefinitely and then time out; the function's own execution timeout governs its maximum runtime, regardless of queue emptiness.

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 creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 24, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.