Courseiva
Troubleshooting and OptimizationeasyMultiple ChoiceObjective-mapped

DVA-C02 Troubleshooting and Optimization Practice Question

A developer is troubleshooting an AWS Lambda function that times out when processing large files from Amazon S3. The function has a 15-minute timeout and 512 MB memory. What should the developer do to resolve this issue?

⚠ Common exam trap

It's easy for candidates to assume the 15-minute timeout is the problem and try to reduce it (Option C) or change invocation patterns (Option B), when the real issue is that Lambda's CPU allocation scales with memory, and insufficient memory leads to insufficient CPU for large file processing.

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 Lambda function memory to 3008 MB.

Increasing the Lambda function memory to 3008 MB is correct because Lambda allocates CPU proportionally to memory, and more CPU reduces processing time for CPU-bound tasks like file parsing. The 15-minute timeout is already the maximum, so the issue is insufficient compute resources, not timeout duration. With 512 MB, the function lacks the CPU throughput to process large files within the timeout, so boosting memory (and thus CPU) directly addresses the root cause.

Answer analysis

Option-by-option breakdown

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

  • Use Amazon S3 batch operations to split the files before processing.

    Why it's wrong here

    Using Amazon S3 Batch Operations is not an effective solution for preventing a Lambda function timeout caused by large files. S3 Batch Operations are designed to perform large-scale, automated actions on existing S3 objects, such as copying, tagging, or invoking a Lambda function *per object*. They do not inherently provide functionality to split large files into smaller chunks before they are processed, which would be necessary to reduce the processing burden on a single Lambda invocation.

  • Add an S3 Event Notification to trigger the function asynchronously.

    Why it's wrong here

    Adding an S3 Event Notification to trigger the function asynchronously does not address a Lambda function timeout issue. S3 Event Notifications are the standard mechanism for triggering Lambda functions when objects are created or modified in an S3 bucket. While asynchronous invocation means the caller doesn't wait for the result, the Lambda function itself still has a defined maximum execution duration, and if its processing logic exceeds this limit, it will still time out regardless of the invocation type.

  • Reduce the Lambda timeout to 5 minutes to force faster processing.

    Why it's wrong here

    Reducing the Lambda timeout to 5 minutes would exacerbate the problem of a function already timing out, rather than forcing faster processing. If a Lambda function is currently failing due to exceeding its allocated execution time, decreasing that limit will only cause it to fail more frequently and potentially earlier in its execution cycle. The objective is to complete the processing successfully, which requires either more time or more efficient resource utilization, not a stricter time constraint.

  • Increase the Lambda function memory to 3008 MB.

    Why this is correct

    Increasing the Lambda function memory to 3008 MB is a highly effective strategy for resolving timeout issues. In the AWS Lambda execution environment, the amount of allocated memory directly correlates with the proportional share of CPU power and network bandwidth provided to the function. By increasing memory, the function gains access to more computational resources, enabling it to process data faster, complete its tasks within the allowed timeout period, and improve overall performance for compute- or I/O-intensive workloads.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

This DVA-C02 question is part of Courseiva's 724-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.