DVA-C02 Security Practice Question
A developer is building a serverless application using AWS Lambda and Amazon API Gateway. The developer wants to restrict access to the API so that only authenticated users can invoke it. Which API Gateway feature should be used?
⚠ Common exam trap
DVA-C02 often tests the distinction between authentication and authorization mechanisms, and candidates confuse usage plans (throttling) with authorizers (authentication), or mistakenly select AWS WAF for user authentication.
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 Lambda authorizer
A Lambda authorizer (formerly custom authorizer) is correct because it allows API Gateway to invoke a Lambda function that validates a token or request parameters and returns an IAM policy granting or denying access. This is the standard way to implement custom authentication logic (e.g., JWT validation, OAuth) for API Gateway REST or HTTP APIs. It directly restricts invocation to authenticated users based on the authorizer's decision.
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 Lambda authorizer
Why this is correct
An API Gateway Lambda authorizer (formerly custom authorizer) is a serverless function that you provide to control access to your API methods. It intercepts incoming requests, validates bearer tokens (like JWTs or OAuth tokens) or other custom authorization headers, and then returns an IAM policy. This policy explicitly allows or denies the request to proceed to the backend integration, making it ideal for implementing custom authentication and authorization schemes.
- ✗
AWS WAF
Why it's wrong here
AWS WAF (Web Application Firewall) is designed to protect web applications or APIs from common web exploits and bots that could affect availability, compromise security, or consume excessive resources. It operates by allowing you to define custom web access control lists (ACLs) to filter traffic based on rules like IP addresses, HTTP headers, or SQL injection patterns. However, WAF does not perform user authentication or authorization; its role is purely defensive against malicious traffic patterns, not validating user identities.
- ✗
API Gateway usage plan
Why it's wrong here
An API Gateway usage plan allows you to manage and meter access to your API for individual customers or applications by defining throttling limits and quotas. It helps prevent API abuse and ensures fair usage by controlling the request rate and total number of requests within a specified period. While essential for API management, usage plans do not provide authentication or authorization capabilities; they merely govern the consumption rates for already authenticated or publicly accessible APIs.
- ✗
API Gateway resource policy
Why it's wrong here
An API Gateway resource policy is an IAM policy that you attach directly to an API Gateway REST API to control who can invoke the API and from where. It enables fine-grained access control based on source IP addresses, AWS accounts, or VPC endpoints, allowing you to restrict API access to specific networks or services. Unlike Lambda authorizers, resource policies operate at the network or account level and are not designed for authenticating individual users or validating tokens.
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 1,135-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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint
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.