SAP-C02 Design for New Solutions Practice Question
A company is designing a serverless application that uses Amazon API Gateway and AWS Lambda. The API must be secured using AWS WAF. Which TWO actions should the company take to integrate WAF with API Gateway? (Choose TWO.)
⚠ Common exam trap
Many exam-takers think WAF must be attached to a CloudFront distribution or a Lambda function, but AWS WAF directly supports association with both API Gateway REST API stages and HTTP APIs without requiring CloudFront.
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
✓
Associate an AWS WAF web ACL with the API Gateway HTTP API
AWS WAF can be directly associated with an API Gateway HTTP API to filter and monitor HTTP requests based on rules in a web ACL. Option D is correct because AWS WAF can also be directly associated with a specific stage of an API Gateway REST API, providing granular security at the API stage level.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Create an AWS WAF web ACL and attach it to the Lambda function
Why it's wrong here
WAF does not attach to Lambda functions directly.
- ✗
Configure API Gateway to require an API key and associate WAF with the usage plan
Why it's wrong here
WAF does not integrate with API keys.
- ✓
Associate an AWS WAF web ACL with the API Gateway HTTP API
Why this is correct
WAF can be associated with HTTP APIs.
- ✓
Associate an AWS WAF web ACL with the API Gateway REST API stage
Why this is correct
WAF can be associated with API Gateway REST API stages.
- ✗
Place AWS WAF in front of Amazon CloudFront and use CloudFront as the API Gateway endpoint
Why it's wrong here
CloudFront is optional, not required for WAF integration.
Visual reference
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.