DOP-C02 Incident and Event Response Practice Question
A DevOps engineer is troubleshooting an AWS Lambda function that is intermittently timing out. The function is configured with a 3-second timeout and 128 MB memory. The function processes messages from an SQS queue. What is the most cost-effective change to reduce timeouts?
⚠ Common exam trap
Many exam-takers assume increasing the timeout is the only way to fix timeouts, but AWS explicitly recommends increasing memory as a cost-effective performance tuning method because it also increases CPU, which can reduce execution time and thus avoid timeouts without increasing cost.
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
✓
Increase the function memory to 256 MB
Increasing the memory to 256 MB is the most cost-effective change because Lambda allocates CPU proportionally to memory, so doubling the memory from 128 MB to 256 MB also doubles the CPU performance. This reduces execution time, which can resolve timeouts without increasing the timeout duration, and since Lambda billing is based on compute time (GB-seconds), the total cost may stay the same or even decrease if the function finishes faster.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Increase the SQS batch size to 20
Why it's wrong here
Increasing the SQS batch size from 10 to 20 would make each Lambda invocation process twice as many messages, increasing the per-invocation execution time and memory consumption rather than reducing them. The reported issue is likely slow individual processing, and larger batches would only average out that slowness across more messages, potentially causing timeouts. It does not provide more CPU or memory to speed up any single message.
- ✗
Increase the function timeout to 10 seconds
Why it's wrong here
Raising the function timeout to 10 seconds does not address the cause of slow execution; it merely gives the function more wall-clock time before being terminated. Timeout limits the maximum duration, but Lambda's processing speed is governed primarily by the allocated memory (which determines CPU). A function that is resource-starved will still execute slowly and may continue to timeout if its total processing time exceeds even 10 seconds, while also increasing cost.
- ✓
Increase the function memory to 256 MB
Why this is correct
Lambda allocates CPU proportionally to the configured memory, so increasing memory to 256 MB from a lower value (e.g., 128 MB) roughly doubles the available vCPU fraction, speeding up CPU-bound tasks. This directly targets the performance bottleneck and is a standard first step in Lambda performance tuning. For the stated issue, this change is more likely to reduce execution time than the other options.
- ✗
Set reserved concurrency to 10
Why it's wrong here
Reserved concurrency is a scaling control that caps the maximum number of simultaneous Lambda invocations, preventing a function from consuming more than its share of account-level concurrency. It has no effect on the execution speed of an individual invocation, and if set to a low value like 10, it could cause throttling errors (429) when demand exceeds capacity. Therefore, it cannot resolve an inherent performance problem and may actually worsen the situation.
Visual reference
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
This DOP-C02 question is part of Courseiva's 1,298-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 →
Same concept, more angles
2 more ways this is tested on DOP-C02
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A DevOps engineer is troubleshooting a Lambda function that processes S3 events. The function has been running successfully for months, but today it started timing out. The engineer checks CloudWatch Logs and sees 'Task timed out after 3.01 seconds' errors. The function is configured with a 3-second timeout. What should the engineer do to resolve the issue?
easy- A.Increase the Lambda function reserved concurrency.
- B.Increase the memory allocation for the Lambda function.
- ✓ C.Increase the Lambda function timeout to 10 seconds.
- D.Configure a dead-letter queue (DLQ) for the Lambda function.
Why C: The error 'Task timed out after 3.01 seconds' indicates the function is exceeding its configured 3-second timeout. Since the function has been running successfully for months and only recently started timing out, the workload has likely grown (larger S3 objects, downstream latency, or cold starts). Increasing the timeout to 10 seconds gives the function enough time to complete its processing, directly addressing the timeout error.
Variation 2. A DevOps engineer is troubleshooting a Lambda function that is timing out. Which TWO actions should the engineer take to diagnose the issue?
easy- A.Set reserved concurrency to 1 to isolate the function.
- ✓ B.Increase the function timeout in the Lambda configuration.
- C.Check the VPC configuration for the Lambda function.
- D.Increase the function memory allocation.
- ✓ E.Review the function's CloudWatch Logs for timeout errors.
Why B: Option B is correct because increasing the function timeout in the Lambda configuration directly addresses the symptom: if the function's work legitimately exceeds the current timeout value, raising it (up to the 15-minute maximum) allows the invocation to complete and confirms whether the timeout is the root cause. Option E is correct because reviewing the function's CloudWatch Logs (the log group /aws/lambda/<function-name>) reveals timeout errors such as 'Task timed out after X seconds', stack traces, and where execution stalled, which is the primary diagnostic evidence for a timing-out Lambda. Option A is not appropriate because setting reserved concurrency to 1 only throttles invocations and does not help diagnose why a single invocation times out. Option C is not the best diagnostic step here because VPC misconfiguration typically causes connection timeouts to resources like RDS or ENIs, but the question asks for general timeout diagnosis and the logs would reveal that pattern first. Option D is not a diagnostic action; increasing memory also increases CPU proportionally and may speed execution, but it is a remediation attempt rather than a troubleshooting step to identify the cause.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.