Courseiva
Development with AWS ServiceseasyMultiple ChoiceObjective-mapped

DVA-C02 Development with AWS Services Practice Question

A developer is writing an AWS Lambda function in Python that needs to download a file from Amazon S3, process it, and upload the result to a different S3 bucket. The function currently runs within the default 3-second timeout, but the developer expects the file size to increase. What is the MOST cost-effective way to handle the increase in processing time?

⚠ Common exam trap

The trap here is that candidates may overcomplicate the solution by choosing Step Functions or provisioned concurrency, thinking they are needed for long-running tasks, when the simplest and most cost-effective fix is merely adjusting the Lambda timeout.

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's timeout to a value higher than the expected processing time.

Increasing the Lambda function's timeout is the most cost-effective solution because it directly addresses the expected increase in processing time without incurring additional costs. Lambda pricing is based on the number of invocations and duration (in GB-seconds), so extending the timeout only charges for the actual time the function runs, not for idle time or additional services. This approach avoids the complexity and cost of Step Functions or provisioned concurrency, which would add unnecessary overhead for a simple sequential task.

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 Lambda function's timeout to a value higher than the expected processing time.

    Why this is correct

    AWS Lambda functions have a configurable timeout setting, which defines the maximum duration a function can execute before being terminated. By increasing this timeout to a value exceeding the anticipated processing time, the developer directly resolves the issue of the function being prematurely terminated. This is the most straightforward and cost-effective approach for a single Lambda function needing more execution time, without introducing additional architectural complexity.

  • Increase the Lambda function's timeout to 15 minutes.

    Why it's wrong here

    While AWS Lambda functions support a maximum timeout of 15 minutes, simply setting it to this absolute limit might not be the optimal or sufficient solution in all cases. The problem statement implies the function *might* exceed its current timeout, but doesn't specify the *new* required duration. If the actual processing time for very large files could potentially exceed 15 minutes, even this maximum setting would still lead to a timeout, necessitating a different architectural pattern.

  • Use Lambda provisioned concurrency to keep the function warm.

    Why it's wrong here

    Lambda provisioned concurrency is designed to keep function instances initialized and ready to respond immediately, thereby minimizing cold start latencies. This feature ensures faster invocation times for frequently used functions by pre-warming execution environments, but it has no impact on the maximum execution duration of an individual function invocation. Therefore, provisioned concurrency does not address the problem of a Lambda function exceeding its configured timeout limit during execution.

  • Refactor the code to use AWS Step Functions to orchestrate the processing.

    Why it's wrong here

    Introducing AWS Step Functions adds orchestration overhead and cost for state management, which does not address the Lambda function’s execution duration limit. The core requirement is simply extending the timeout, not coordinating multiple distributed steps. Step Functions would be correct for a multi-step workflow with branching or retries, but here the single-function timeout can be raised directly in the Lambda configuration.

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

Courseiva writes every DVA-C02 question from scratch — 724 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.