DVA-C02 Development with AWS Services Practice Question
A developer is building a REST API using API Gateway and Lambda. The API must support multiple HTTP methods and use a custom domain name with an SSL certificate. The developer wants to enable caching for the /products GET endpoint to reduce latency. Which step is essential to enable caching for this specific endpoint?
⚠ Common exam trap
Many candidates confuse enabling caching at the stage level (which caches all methods) with enabling it on a specific method, and they overlook the requirement to specify cache key parameters for per-endpoint control.
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 caching on the /products GET method and specify cache key parameters.
Enabling caching on a specific method (e.g., /products GET) in API Gateway allows you to configure cache key parameters, which control how the cache key is generated based on request parameters. This is essential for per-endpoint caching, as it ensures that only responses for the /products GET endpoint are cached, reducing latency for that specific method without affecting other endpoints.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Set the TTL (time-to-live) for the /products GET method to a non-zero value.
Why it's wrong here
Setting the TTL (Time-To-Live) for a method's cache is a configuration parameter that determines how long a cached response remains valid. However, merely setting a non-zero TTL does not *enable* caching itself. Caching must first be explicitly enabled at the API Gateway stage level, and then optionally overridden or configured per method, before TTL values become effective in storing and serving cached responses. This option describes a parameter, not the enabling action.
- ✓
Enable caching on the /products GET method and specify cache key parameters.
Why this is correct
To implement caching for a specific API Gateway method like /products GET, caching must first be enabled at the API stage level. Subsequently, individual methods can be configured to utilize this cache. This involves explicitly enabling caching for the /products GET method and defining cache key parameters, which dictate how requests are uniquely identified for caching purposes, often including query string parameters, headers, or path parameters. This ensures relevant responses are stored and retrieved efficiently.
- ✗
Flush the API cache to start fresh.
Why it's wrong here
Flushing the API cache is an operational task performed on an *already active* API Gateway cache. Its purpose is to immediately invalidate and remove all existing cached responses, forcing subsequent requests to reach the backend integration. This action is used for maintenance or to ensure fresh data is retrieved after a backend update, but it does not configure or activate the caching mechanism in the first place.
- ✗
Enable caching on the API stage and set the 'Cache Status' to 'AVAILABLE'.
Why it's wrong here
Enabling caching on the API stage provisions the underlying cache cluster for the entire stage. While this is a prerequisite, it does not automatically cache individual methods. Each method, such as /products GET, must still be explicitly configured to *use* the stage's cache, often with its own specific settings like TTL and cache key parameters. Setting 'Cache Status' to 'AVAILABLE' merely reflects the cache cluster's operational state, not that specific methods are actively caching.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
About these practice questions
This DVA-C02 question is part of Courseiva's 724-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 →
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.