CLF-C02 Security and Compliance Practice Question
A company hosts a web application on AWS that uses Amazon CloudFront for content delivery and an Application Load Balancer (ALB) in front of Amazon EC2 instances. The security team wants to protect the application against common web exploits such as SQL injection and cross-site scripting (XSS). They need a managed service that can inspect incoming HTTP/HTTPS requests and block malicious traffic before it reaches the application servers. Which AWS service should the company use to meet these requirements?
⚠ Common exam trap
It's easy for candidates to confuse AWS Shield Advanced (Layer 3/4 DDoS protection) with AWS WAF (Layer 7 application-layer filtering), leading them to select Shield Advanced for web exploit protection instead of the correct service.
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
✓
AWS WAF
AWS WAF is a managed web application firewall that helps protect web applications from common web exploits like SQL injection and cross-site scripting (XSS). It integrates directly with Amazon CloudFront and Application Load Balancers (ALB) to inspect incoming HTTP/HTTPS requests and block malicious traffic before it reaches the application servers. This makes it the correct choice for the security team's requirement to filter and block specific attack patterns at the application layer.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
AWS WAF
Why this is correct
AWS WAF is a web application firewall that monitors and filters HTTP/HTTPS traffic to protect against attacks such as SQL injection and cross-site scripting. It integrates directly with CloudFront and ALB, making it the correct choice for this scenario.
- ✗
AWS Shield Advanced
Why it's wrong here
AWS Shield Advanced provides enhanced DDoS mitigation against volumetric, state-exhaustion, and protocol-based attacks at the network and transport layers, with 24/7 detection and response support. While it can integrate with AWS WAF for layer 7 protection, Shield Advanced itself does not inspect HTTP payloads or maintain custom signature rules to block specific attack patterns like SQL injection or cross-site scripting. Because it lacks application-layer request filtering, it is not the correct service to stop those web application attacks directly.
When this WOULD be correct
A company needs to protect against large-scale DDoS attacks (e.g., UDP floods, reflection attacks) targeting their CloudFront distribution or ALB. They require 24/7 DDoS response team access and cost protection from scaling due to attacks.
- ✗
AWS Firewall Manager
Why it's wrong here
AWS Firewall Manager is a security management service that allows you to centrally configure and manage firewall rules across accounts and resources, including AWS WAF rules. However, it does not directly inspect traffic; it is a policy management tool, not the inspection engine itself.
When this WOULD be correct
A company with multiple AWS accounts and resources wants to centrally enforce a common set of AWS WAF rules across all accounts and resources, such as automatically applying a web ACL to all Application Load Balancers in an organization.
- ✗
Amazon Inspector
Why it's wrong here
Amazon Inspector is a vulnerability management service that uses system agents to scan Amazon EC2 instances and container images for known software CVEs and unintended network exposure. It runs on a schedule or on-demand, not inline in the web traffic path, so it cannot monitor or filter live HTTP/HTTPS requests. As a result, it cannot provide real-time protection against SQL injection or cross-site scripting attacks, making it the wrong choice for this requirement.
When this WOULD be correct
A company wants to automatically assess EC2 instances for common vulnerabilities and deviations from security best practices, such as open ports or outdated software, and receive a report of findings. Amazon Inspector would be the correct service to schedule and run these assessments.
Option-by-option analysis
Why each answer is right or wrong
Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The CLF-C02 exam frequently reuses these exact scenarios with slightly different constraints.
✓AWS WAFCorrect answer▾
Why this is correct
AWS WAF is a web application firewall that monitors and filters HTTP/HTTPS traffic to protect against attacks such as SQL injection and cross-site scripting. It integrates directly with CloudFront and ALB, making it the correct choice for this scenario.
✗AWS Shield AdvancedWrong answer — click to see why▾
Why this is wrong here
AWS Shield Advanced provides DDoS protection, not application-layer inspection for SQL injection or XSS. It does not inspect HTTP request payloads to block web exploits.
★ When this WOULD be the correct answer
A company needs to protect against large-scale DDoS attacks (e.g., UDP floods, reflection attacks) targeting their CloudFront distribution or ALB. They require 24/7 DDoS response team access and cost protection from scaling due to attacks.
Why candidates choose this
Candidates may confuse Shield Advanced with WAF because both are security services, or assume 'Advanced' implies broader protection including web exploits.
✗AWS Firewall ManagerWrong answer — click to see why▾
Why this is wrong here
AWS Firewall Manager is a policy management service that centrally configures and manages firewall rules across accounts and resources, but it does not itself inspect traffic for SQL injection or XSS; it relies on AWS WAF rules to do so.
★ When this WOULD be the correct answer
A company with multiple AWS accounts and resources wants to centrally enforce a common set of AWS WAF rules across all accounts and resources, such as automatically applying a web ACL to all Application Load Balancers in an organization.
Why candidates choose this
Candidates may confuse Firewall Manager as a managed firewall service that directly protects against web exploits, when in fact it is a policy management tool that orchestrates AWS WAF, not a traffic inspection service itself.
✗Amazon InspectorWrong answer — click to see why▾
Why this is wrong here
Amazon Inspector is a vulnerability management service that scans EC2 instances, container images, and Lambda functions for software vulnerabilities and unintended network exposure, not a web application firewall that inspects HTTP/HTTPS requests for SQL injection or XSS.
★ When this WOULD be the correct answer
A company wants to automatically assess EC2 instances for common vulnerabilities and deviations from security best practices, such as open ports or outdated software, and receive a report of findings. Amazon Inspector would be the correct service to schedule and run these assessments.
Why candidates choose this
Candidates may confuse 'inspect' in the question with Amazon Inspector's name, mistakenly thinking it inspects web traffic, when it actually inspects compute resources for vulnerabilities.
Analysis generated from the official CLF-C02blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”
Visual reference
Go deeper
Related to this question
About these practice questions
Courseiva writes every CLF-C02 question from scratch — 988 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
3 more ways this is tested on CLF-C02
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A company hosts a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). The security team wants to protect the application from common web exploits, including SQL injection and cross-site scripting (XSS). The solution must integrate directly with the ALB and allow custom rules to be defined. Which AWS service should the company use?
medium- ✓ A.AWS WAF
- B.AWS Shield Advanced
- C.Security Groups
- D.AWS Firewall Manager
Why A: AWS WAF is a web application firewall that integrates directly with an Application Load Balancer to filter and monitor HTTP(S) requests. It provides managed rules to block common web exploits such as SQL injection and cross-site scripting (XSS), and allows you to define custom rules using conditions like IP addresses, HTTP headers, and URI strings. This makes it the correct choice for protecting the ALB-hosted application against these specific threats.
Variation 2. A company hosts a web application on Amazon EC2 instances behind an Application Load Balancer. The security team wants to protect the application from common web attacks such as SQL injection and cross-site scripting (XSS) at the edge, before the requests reach the application. The company wants to use pre-built rule sets maintained by AWS to quickly enable protection, and the solution should be fully managed with no servers to manage. Which AWS service should the company use?
medium- A.AWS Shield Advanced
- B.Amazon GuardDuty
- ✓ C.AWS WAF
- D.AWS Network Firewall
Why C: AWS WAF is a fully managed web application firewall that helps protect web applications from common web exploits like SQL injection and cross-site scripting (XSS). It integrates with Application Load Balancers (ALBs) and allows you to use pre-built, AWS-managed rule sets (e.g., the AWS Managed Rules for SQL injection and XSS) to quickly enable protection at the edge, before traffic reaches the EC2 instances. This meets the requirement for a serverless, managed solution with no infrastructure to maintain.
Variation 3. A company hosts a critical e-commerce web application on Amazon EC2 instances behind an Application Load Balancer (ALB). The security team is concerned about Layer 7 attacks, such as SQL injection and cross-site scripting (XSS). They also want to automatically block traffic from known malicious IP addresses. The company needs a managed web application firewall that integrates directly with the ALB. Which AWS service should the company use?
medium- ✓ A.AWS WAF
- B.AWS Shield Advanced
- C.Amazon GuardDuty
- D.AWS Firewall Manager
Why A: AWS WAF is a managed web application firewall that protects web applications from common Layer 7 attacks, such as SQL injection and cross-site scripting (XSS), by inspecting HTTP/HTTPS requests. It integrates directly with an Application Load Balancer (ALB) to allow you to create custom rules that block or allow traffic based on request patterns, including automatically blocking traffic from known malicious IP addresses using managed IP reputation lists.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CLF-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 CLF-C02 exam.