DVA-C02 Development with AWS Services Practice Question
A company is building a RESTful API using Amazon API Gateway and AWS Lambda. The API must allow users to authenticate using an identity provider that supports OpenID Connect (OIDC). The developer wants to offload authentication and authorization to API Gateway. Which API Gateway feature should the developer use?
⚠ Common exam trap
A common mix-up: candidates confuse the Native JWT authorizer (available only for HTTP APIs) with the Cognito User Pools authorizer (available for REST APIs), assuming any OIDC provider requires a Lambda authorizer or Cognito integration.
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
✓
Native JWT authorizer (HTTP API)
The Native JWT authorizer for HTTP APIs in API Gateway directly validates JSON Web Tokens (JWTs) from an OIDC-compliant identity provider without requiring custom code. This offloads both authentication and authorization to API Gateway by configuring the issuer URL and audience, matching the requirement to use an OIDC provider.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Amazon Cognito User Pools authorizer
Why it's wrong here
The Amazon Cognito User Pools authorizer is specifically designed to integrate with Amazon Cognito User Pools, validating JWTs issued exclusively by a Cognito User Pool. While Cognito is an OIDC-compatible identity provider, this authorizer is not a generic solution for arbitrary OIDC providers. It cannot be configured to validate tokens from other OIDC-compliant identity providers, making it unsuitable when the requirement is to support *any* OIDC provider.
- ✗
Custom Lambda authorizer
Why it's wrong here
Custom Lambda authorizers are unsuitable here because they necessitate writing bespoke code to validate OIDC tokens and generate IAM policies, failing to offload the OIDC authentication *natively* to API Gateway as requested. This approach requires the developer to implement the OIDC validation logic themselves. However, they are a powerful choice for integrating with unique, non-standard identity providers, custom authentication mechanisms, or when complex, dynamic authorisation logic beyond simple token validation is required, offering maximum flexibility.
- ✓
Native JWT authorizer (HTTP API)
Why this is correct
The native JWT authorizer for API Gateway HTTP APIs provides built-in support for validating JSON Web Tokens (JWTs) issued by any OpenID Connect (OIDC) compliant identity provider. Developers configure the issuer URL and optional audience claims directly within API Gateway, offloading token validation, signature verification, and claim checks. This managed solution eliminates the need for custom code, ensuring efficient and secure authentication for RESTful APIs.
- ✗
AWS IAM authorizer
Why it's wrong here
The AWS IAM authorizer leverages AWS Identity and Access Management (IAM) to control access to API Gateway endpoints. It validates requests signed with AWS Signature Version 4 (SigV4) using AWS credentials, typically from IAM users or roles. This authorizer is designed for authenticating AWS principals within the AWS ecosystem, not for validating OIDC-based JWTs issued by external identity providers, making it inappropriate for the specified use case.
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.