Courseiva
Troubleshooting and OptimizationhardMultiple SelectObjective-mapped

DVA-C02 Troubleshooting and Optimization Practice Question

A company is running a serverless application using AWS Lambda and Amazon API Gateway. The application experiences increased latency during peak hours. CloudWatch metrics show that Lambda function duration remains stable, but API Gateway latency spikes. Which THREE actions should the developer take to reduce API Gateway latency?

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

Enable compression for API responses.

Options B, D, and E are correct. Enabling compression reduces payload size, decreasing response time. API Gateway caching reduces backend calls by serving cached responses, lowering latency. Switching to Regional endpoint reduces network latency by eliminating the global edge network hop. Option A is wrong because increasing Lambda timeout does not reduce API Gateway latency; it only allows functions to run longer. Option C is wrong because throttling limits cap request rates but do not reduce latency for individual requests.

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 timeout.

    Why it's wrong here

    Increasing the Lambda function timeout only extends the maximum execution duration before Lambda terminates the function; it has no effect on how quickly a request travels through API Gateway or how fast the function itself executes. If the observed latency is due to a slow invocation or network transfer, a higher timeout won't reduce the measured response time—it only prevents a premature timeout. Since the problem is latency, not a function hitting a time limit, this change is ineffective.

  • Enable compression for API responses.

    Why this is correct

    Enabling compression in API Gateway allows it to gzip response bodies when the client sends an Accept-Encoding: gzip header, shrinking the payload before transmission over the wire. Because the largest components of a JSON API response are often whitespace and repeated field names, gzip can reduce the transfer size by 70–80%, cutting network round-trip time significantly. This directly targets the latency component caused by response transfer time without altering Lambda execution or API Gateway routing.

  • Increase the API Gateway throttling limits.

    Why it's wrong here

    API Gateway throttling limits control the number of requests per second that can hit the backend, protecting it from traffic spikes; they do not influence the round-trip time of any individual successful request. Raising the throttle limit only allows more concurrent or burst requests, and if the Lambda function or API Gateway is already at capacity, a higher limit could increase contention and worsen latency. Therefore, adjusting throttling is a scaling measure, not a performance optimization for per-request response times.

  • Enable API Gateway caching for the endpoints.

    Why this is correct

    Enabling API Gateway caching stores completed responses in the API Gateway cache for a configurable TTL, so subsequent identical requests are served instantly from cache rather than triggering a new Lambda invocation. This eliminates the Lambda execution time, cold-start overhead, and any backend processing from the response path for cache hits, dramatically lowering end-to-end latency for repeated reads. It is most effective for endpoints with stable, reusable data and high request repetition.

  • Switch API Gateway endpoint type from Edge-optimized to Regional.

    Why this is correct

    Edge-optimized API Gateway endpoints route requests through the global CloudFront network to the nearest edge location, adding an extra network hop and overhead even when the client is in the same region as the Lambda function. Switching to a Regional endpoint makes API Gateway directly serve requests from the same region where the workload is deployed, which avoids the CloudFront intermediary and reduces network latency for local clients. However, this trade-off only benefits clients near the deployed region; it would harm global users if they are expected to traverse the internet to a single region.

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

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.