DVA-C02 Development with AWS Services Practice Question
An organization has a Lambda function that processes messages from an Amazon SQS queue. The function is configured with a reserved concurrency of 5. The SQS queue has a visibility timeout of 30 seconds. The Lambda function takes an average of 45 seconds to process each message. What is the likely behavior of this setup?
⚠ Common exam trap
Candidates often mistakenly believe that AWS Lambda automatically manages or extends the SQS visibility timeout during execution. In reality, Lambda does not extend the timeout; it only deletes the message from the queue after the function successfully completes. If the function is still running when the visibility timeout expires, the message becomes visible to other consumers.
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
✓
Messages will be processed multiple times because they become visible again before the function completes.
The Lambda function takes 45 seconds to process a message, but the SQS queue's visibility timeout is only 30 seconds. Because the processing time exceeds the visibility timeout, the message will become visible again in the queue after 30 seconds and can be received by another Lambda invocation before the first one finishes. This leads to duplicate processing. To prevent this, the SQS visibility timeout should be configured to be at least 6 times the Lambda function's timeout.
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 will be throttled due to reserved concurrency.
Why it's wrong here
Reserved concurrency in AWS Lambda limits the maximum number of simultaneous executions for a function. While exceeding this limit would lead to throttling of *new* invocations, it does not directly cause existing, in-flight messages to be processed multiple times due to a short visibility timeout. Throttling prevents new work from starting, whereas the scenario described involves a message becoming visible again before its initial processing completes, leading to re-processing.
- ✗
The Lambda function will process messages successfully with no issues.
Why it's wrong here
This statement is incorrect because a fundamental issue exists when the SQS visibility timeout is shorter than the Lambda function's processing duration. In such a scenario, the message will automatically reappear in the queue before the Lambda function can successfully complete its work and delete the message. This premature re-visibility ensures that the message will be picked up again, leading to duplicate processing rather than successful, issue-free completion.
- ✓
Messages will be processed multiple times because they become visible again before the function completes.
Why this is correct
This option correctly identifies the problem: if the SQS visibility timeout is configured to be shorter than the time required for the Lambda function to fully process a message, the message will become visible again in the queue. Consequently, another Lambda invocation, or even the same one after completing its current task, can retrieve and process the identical message. This leads to duplicate processing, which can cause data inconsistencies, increased costs, and unexpected application behavior.
- ✗
The Lambda function will automatically increase its processing speed.
Why it's wrong here
AWS Lambda functions execute with a fixed amount of allocated memory and corresponding CPU power, which determines their processing speed. Lambda does not possess an inherent mechanism to automatically increase its processing speed or resource allocation dynamically in response to a message taking too long to process. Any changes to processing speed would require manual configuration adjustments to memory or code optimization, not an automatic system response to a visibility timeout issue.
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 1,135 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.