DVA-C02 Development with AWS Services Practice Question
A developer is building a REST API using Amazon API Gateway that will serve static content from an Amazon S3 bucket. The API should cache responses for frequently accessed objects to reduce latency. Which API Gateway feature should the developer enable?
⚠ Common exam trap
Watch out — candidates often confuse API Gateway caching with CloudFront, assuming that a CDN is required for caching, when in fact API Gateway has its own built-in caching feature that is simpler to enable for REST APIs serving static content.
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
✓
API Gateway caching with TTL set per method.
API Gateway caching allows you to cache responses from your backend (e.g., an S3 bucket) for a specified Time-to-Live (TTL) per method, reducing the number of calls to the backend and lowering latency for frequently accessed objects. This feature is natively integrated with API Gateway and requires no additional services or complex configurations, making it the most direct solution for caching static content served through a REST API.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
API Gateway caching with TTL set per method.
Why this is correct
API Gateway offers built-in caching capabilities that can be enabled per stage or per method. This feature stores responses from your backend integrations, reducing the number of requests sent to your backend and significantly improving API response times for repeat requests. You can configure a Time To Live (TTL) for cached responses, allowing precise control over how long data remains in the cache before being refreshed, which is crucial for managing data freshness and reducing backend load.
- ✗
Amazon CloudFront as a custom domain.
Why it's wrong here
Amazon CloudFront is a global content delivery network (CDN) service designed to securely deliver data, videos, applications, and APIs to customers worldwide with low latency. While CloudFront can be placed in front of API Gateway to provide additional edge caching, WAF integration, or custom domain management, it is a separate service. Its caching mechanism is distinct from API Gateway's native caching, and simply using it for a custom domain does not inherently provide API Gateway's specific backend response caching functionality.
- ✗
Lambda@Edge for caching.
Why it's wrong here
Lambda@Edge allows you to run Node.js or Python code at AWS edge locations in response to CloudFront events, such as viewer requests or origin responses. While this compute service can be programmed to modify caching headers or generate dynamic content, its primary function is not to serve as a direct caching layer itself. Implementing a caching solution solely with Lambda@Edge would be an overly complex and indirect approach compared to using API Gateway's native caching feature, and it inherently requires CloudFront.
- ✗
S3 Transfer Acceleration.
Why it's wrong here
S3 Transfer Acceleration is a feature that enables fast, easy, and secure transfers of files over long distances between your client and an S3 bucket. It leverages CloudFront's globally distributed edge locations to optimize data paths, significantly speeding up uploads to S3. This service is exclusively designed for accelerating data ingress into S3 and has no functional relevance to caching API responses or reducing latency for API Gateway endpoints.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
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 →
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.