DVA-C02 Development with AWS Services Practice Question
A developer is building a REST API using Amazon API Gateway and wants to transform the request data before sending it to the backend Lambda function. The transformation includes mapping query string parameters to a JSON body. Which API Gateway feature should be used?
⚠ Common exam trap
It's easy for candidates to confuse request validation (Option C) with data transformation, assuming that validating the request structure also implies the ability to reshape the data, but validation only checks for presence and format, not mapping or transformation.
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
✓
Velocity Template Language (VTL) mapping templates
API Gateway uses Velocity Template Language (VTL) mapping templates to transform incoming request data, such as mapping query string parameters into a JSON body before passing it to the backend Lambda function. This feature allows you to define a template that extracts values from the request's query string parameters (e.g., `$input.params('paramName')`) and constructs a new JSON payload, enabling seamless integration with Lambda without modifying the client request.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Velocity Template Language (VTL) mapping templates
Why this is correct
Velocity Template Language (VTL) mapping templates are a core feature within API Gateway's integration request and response stages. They enable the transformation of incoming client request payloads and outgoing backend responses into formats compatible with the integration. This includes converting query string parameters, path parameters, or headers into a structured JSON body, or vice-versa, making them essential for adapting data formats between client and backend services.
- ✗
Lambda authorizer
Why it's wrong here
A Lambda authorizer, also known as a custom authorizer, is specifically designed to control access to API Gateway methods by executing a custom authorization Lambda function. This function evaluates incoming request tokens or credentials and returns an IAM policy to either permit or deny the request. Its purpose is purely for authentication and authorization, not for modifying or transforming the actual data payload that is passed to the backend integration.
- ✗
Request validator
Why it's wrong here
Request validators in API Gateway are used to enforce the structural integrity and content validity of incoming API requests against a defined JSON schema. They automatically check request bodies, headers, and query parameters, rejecting any requests that do not conform to the specified schema with a 400 Bad Request error. While vital for ensuring data quality and preventing malformed requests, request validators do not perform any data transformation or modification.
- ✗
CORS configuration
Why it's wrong here
Cross-Origin Resource Sharing (CORS) configuration in API Gateway manages browser-based security policies for requests originating from different domains than the API itself. It involves setting specific HTTP response headers, such as Access-Control-Allow-Origin, to inform browsers whether a cross-origin request is permitted. This mechanism solely addresses browser security restrictions and does not possess any capability to transform or alter the content of the request or response payload.
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
One of 724 original DVA-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.