Courseiva
Development with AWS ServiceseasyMultiple ChoiceObjective-mapped

DVA-C02 Development with AWS Services Practice Question

A developer is designing a REST API using Amazon API Gateway that experiences high traffic with many repeated requests for the same data. The developer wants to reduce backend load and improve response times. Which feature should the developer enable on the API Gateway method?

⚠ Common exam trap

The trap here is that candidates may overcomplicate the solution by choosing a distributed cache like ElastiCache or a CDN like CloudFront, when the simplest and most cost-effective managed service (API Gateway caching) directly addresses the requirement at the API layer.

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

API Gateway caching stores responses from backend endpoints for a configurable Time-to-Live (TTL). When a request for the same data arrives, API Gateway serves the cached response directly without invoking the backend, reducing load and improving latency. This is the most straightforward and managed solution for repeated requests at the API layer.

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

    Why this is correct

    Enabling API Gateway caching directly addresses the problem by storing responses from the backend integration (e.g., Lambda) for a configurable Time-To-Live (TTL). This significantly reduces the number of identical requests that reach the backend service, offloading the compute and database resources. It operates at the API Gateway layer, making it highly efficient for repeated requests to the same API method and improving overall API responsiveness.

  • Implement caching in the Lambda function using a local cache

    Why it's wrong here

    Implementing local caching within a Lambda function, such as using an in-memory hash map, can indeed reduce subsequent compute cycles *within that specific Lambda execution environment*. However, this approach does not offload the API Gateway layer itself, meaning every request still fully traverses API Gateway and invokes the Lambda function. Furthermore, local Lambda caches are ephemeral and tied to individual execution environments, offering limited benefit for widely distributed, repeated requests compared to a centralized API Gateway cache.

  • Use an Amazon ElastiCache Redis cluster and modify the Lambda function to check the cache first

    Why it's wrong here

    Using an Amazon ElastiCache Redis cluster and modifying the Lambda function introduces unnecessary complexity and latency for caching repeated requests *at the API Gateway layer*. The question specifically asks for a feature *on API Gateway* to address the problem. While ElastiCache is a powerful caching solution, it requires application-level integration within the Lambda, adding development overhead and an additional network hop. This approach is suitable for caching data *within* application logic, sharing cache across multiple services, or when more advanced caching patterns are needed beyond API Gateway's native capabilities.

  • Place an Amazon CloudFront distribution in front of API Gateway

    Why it's wrong here

    Placing CloudFront in front of API Gateway is incorrect because the question specifically asks for a feature *enabled on the API Gateway method* itself. CloudFront is a separate Content Delivery Network (CDN) service, not an intrinsic API Gateway method setting. It is tempting because CloudFront is designed for caching content at edge locations globally, effectively reducing latency and backend load for distributed users, and would be a valid caching solution if the scope wasn't limited to API Gateway method features.

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.