ANS-C01 Network Implementation Practice Question
A global e-commerce company uses AWS CloudFront to distribute content. They have an origin behind an Application Load Balancer (ALB) in a VPC. The ALB is internet-facing and has a security group that allows inbound HTTPS traffic from CloudFront's IP ranges. Users in some regions report slow loading times. The company wants to reduce latency and improve performance. They are considering using Lambda@Edge and origin failover. However, they also notice that the ALB is receiving traffic directly from some IPs that are not CloudFront IPs, causing unnecessary load. What should a network engineer do to restrict access to the ALB to only 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
✓
Update the ALB security group to allow inbound HTTPS only from the CloudFront managed prefix list
The best practice is to restrict the ALB security group to the CloudFront managed prefix list (com.amazonaws.global.cloudfront.origin-facing). This dynamically allows only CloudFront IPs and automatically updates when CloudFront IPs change. Option C (custom header) is a good additional measure but not sufficient alone because attackers can mimic headers. Option B (AWS WAF) can help block non-CloudFront traffic but is not the primary method and adds complexity. Option D (VPC endpoint) is not applicable because CloudFront does not use VPC endpoints; it communicates over the internet. Therefore, Option A is correct.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Update the ALB security group to allow inbound HTTPS only from the CloudFront managed prefix list
Why this is correct
This restricts access to CloudFront IPs only.
- ✗
Use AWS WAF to block requests that do not come from CloudFront IPs
Why it's wrong here
AWS WAF operates at Layer 7, inspecting HTTP/S requests. While it can block non-CloudFront IPs, the Application Load Balancer would still receive and process these connections before WAF applies its rules, failing to prevent the "unnecessary load" from direct traffic mentioned in the scenario. WAF is designed for filtering malicious web requests, bot traffic, or specific Layer 7 patterns *after* traffic has reached the application layer. It would be a suitable choice for protecting the ALB from web exploits or rate-based attacks *once CloudFront is the sole origin*.
- ✗
Configure the ALB to require a custom header (e.g., X-Origin-Verify) and validate it in the origin
Why it's wrong here
Custom header is a best practice but can be spoofed; security group is more fundamental.
- ✗
Set up a VPC endpoint for CloudFront to route traffic privately
Why it's wrong here
CloudFront does not use VPC endpoints; it's a global service.
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 ANS-C01 question is part of Courseiva's 1,621-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 ANS-C01 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 ANS-C01 exam.