SAP-C02 Design for New Solutions Practice Question
A company is designing a new serverless application that uses Amazon API Gateway and AWS Lambda. The application must authenticate users using a third-party identity provider (IdP) that supports OpenID Connect (OIDC). The company wants to offload authentication to the API Gateway. Which solution should the architect recommend?
⚠ Common exam trap
Many exam-takers assume a Lambda authorizer is required for any third-party IdP, missing that Cognito can act as an OIDC client to offload token validation to API Gateway's native authorizer.
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
✓
Use an API Gateway COGNITO_USER_POOLS authorizer with Cognito configured as an OIDC client to the third-party IdP
It uses Amazon Cognito as an OIDC client to the third-party IdP, allowing API Gateway's COGNITO_USER_POOLS authorizer to validate tokens from the IdP without custom code. This offloads authentication entirely to API Gateway, as the authorizer checks the JWT token against the Cognito user pool, which trusts the IdP's OIDC tokens. The architecture meets the requirement of using a third-party IdP while keeping the serverless application simple and managed.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Use an API Gateway COGNITO_USER_POOLS authorizer with Cognito configured as an OIDC client to the third-party IdP
Why this is correct
Cognito can federate with OIDC IdPs, and API Gateway validates the Cognito token.
- ✗
Use an API Gateway COGNITO_USER_POOLS authorizer
Why it's wrong here
Cognito user pools can be used as an OIDC identity provider, but the authorizer itself validates Cognito tokens, not directly from a third-party IdP.
- ✗
Use an API Gateway Lambda authorizer
Why it's wrong here
Lambda authorizer is custom and does not offload authentication.
- ✗
Use an API Gateway IAM authorizer
Why it's wrong here
IAM authorizer uses AWS IAM, not OIDC.
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 1,660 original SAP-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 SAP-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 SAP-C02 exam.