Courseiva
Question 1,096 of 724
Development with AWS ServiceshardMultiple ChoiceObjective-mapped

DVA-C02 Development with AWS Services Practice Question

A developer is building a REST API using Amazon API Gateway and AWS Lambda. The API receives a large number of requests with duplicate payloads from the same client within a short time window. To reduce Lambda invocations and improve performance, the developer wants to return the previously computed response for identical requests based on a unique client ID in the header. How can the developer achieve this using API Gateway features?

⚠ Common exam trap

Many candidates confuse API Gateway caching (which returns cached responses for identical cache keys) with usage plans or throttling (which only limit request rates) or with Lambda-level caching (which still incurs invocation costs).

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 API Gateway caching on the stage and configure the client ID header as a cache key parameter. Set a cache TTL of 5 minutes.

API Gateway caching allows you to store responses for a configurable TTL and use the client ID header as a cache key parameter. This means that when a request with the same client ID arrives within the TTL window, API Gateway returns the cached response directly without invoking the Lambda function, reducing invocations and improving performance.

Answer analysis

Option-by-option breakdown

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

  • Enable API Gateway caching on the stage and configure the client ID header as a cache key parameter. Set a cache TTL of 5 minutes.

    Why this is correct

    API Gateway caching uses cache key parameters to index responses. By including the client ID header in the cache key, different clients get separate cached responses. The TTL controls how long the response is cached.

  • Configure a usage plan with a quota and throttle settings to limit requests per client ID.

    Why it's wrong here

    Usage plans in API Gateway are designed to control access and manage request rates by setting quotas and throttle limits per API key or client. They do not, however, store or serve cached responses. Each request, if allowed by the plan, would still trigger an invocation of the backend Lambda function, failing to reduce the compute load or improve response times through caching.

  • Use request validation to reject requests that have the same client ID within 5 minutes.

    Why it's wrong here

    API Gateway request validation primarily ensures that incoming requests conform to a defined JSON schema for headers, query parameters, or body. It checks the structural integrity and data types of the request payload. This feature cannot track historical requests or detect duplicate client IDs over time, nor does it provide any mechanism for caching responses to reduce backend calls.

  • Reduce the Lambda function's batch size to 1 and implement caching logic inside the function using an external cache like ElastiCache.

    Why it's wrong here

    Implementing caching logic directly within the Lambda function using an external service like ElastiCache is a viable technical approach for caching. However, it shifts the caching responsibility from API Gateway to the backend application, increasing the Lambda function's complexity and operational overhead. The question specifically seeks an API Gateway feature to achieve caching, making this a less optimal solution given the context of leveraging built-in service capabilities.

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 creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.