Courseiva

DVA-C02 Development with AWS Services Practice Question

A developer notices that an AWS Lambda function is timing out after 15 seconds. The function makes HTTP requests to an external API. How can the developer resolve this issue without changing the function code?

⚠ Common exam trap

A common mix-up: candidates confuse timeout with concurrency or memory, assuming that increasing resources or isolation will speed up execution, when in fact the issue is simply the allowed execution duration.

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 timeout setting of the Lambda function

The Lambda function is timing out because its configured execution timeout (15 seconds) is too short for the HTTP requests to the external API to complete. Increasing the timeout setting (up to the maximum limit of 15 minutes) allows the function to run longer and wait for the API response, resolving the timeout without modifying the code. This is a configuration change in the Lambda function settings, not a code change.

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 reserved concurrency

    Why it's wrong here

    Increasing reserved concurrency for an AWS Lambda function ensures that a specified number of concurrent executions are always available for that function, preventing throttling due to account-wide or unreserved concurrency limits. However, it does not alter the maximum execution duration for any individual invocation. A function timing out indicates that a single execution exceeds its allowed duration, which is unrelated to how many instances can run simultaneously.

  • ✓

    Increase the timeout setting of the Lambda function

    Why this is correct

    When an AWS Lambda function is timing out, it means its execution duration has exceeded the configured timeout limit. Increasing this timeout setting directly addresses the issue by allowing the function more time to complete its processing before Lambda terminates it. The maximum configurable timeout for a Lambda function is 15 minutes (900 seconds), providing ample flexibility for longer-running tasks.

  • ✗

    Place the Lambda function in a VPC

    Why it's wrong here

    Placing an AWS Lambda function within a Virtual Private Cloud (VPC) provides it with access to private resources like Amazon RDS databases or EC2 instances that are not publicly accessible. While VPC configuration can impact network latency or connectivity for external services, it does not inherently modify the function's execution timeout setting. A timeout occurs due to the function's code running longer than permitted, irrespective of its network environment.

  • ✗

    Decrease the memory allocation of the Lambda function

    Why it's wrong here

    Decreasing the memory allocation for an AWS Lambda function is counterproductive when facing timeouts, as memory is directly proportional to the available CPU power. Reducing memory typically leads to a decrease in CPU cycles and overall processing capability, which would likely increase the function's execution time rather than shorten it. This action would exacerbate the timeout issue by making the function run even slower.

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

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