CLF-C02 Security and Compliance Practice Question
A company hosts a public-facing web application behind an Application Load Balancer (ALB). The development team has recently identified that the application is vulnerable to common web attacks such as SQL injection and cross-site scripting (XSS). The security team wants to deploy a managed solution that can inspect incoming HTTP requests and block malicious traffic before it reaches the application. The solution must integrate directly with the existing ALB and provide pre-configured rule sets that can be customized. Which AWS service should the company use?
⚠ Common exam trap
A common mix-up: candidates confuse AWS Shield Advanced (which handles DDoS) with AWS WAF (which handles application-layer attacks like SQLi and XSS), but Shield does not inspect request payloads for malicious content.
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 integrates directly with Application Load Balancers to inspect HTTP/HTTPS requests. It provides pre-configured rule sets, such as those for SQL injection and cross-site scripting (XSS), which can be customized to block malicious traffic before it reaches the application. This makes it the correct choice for the described use case.
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 Shield Advanced
Why it's wrong here
AWS Shield Advanced is a managed DDoS protection service that defends against volumetric and state-exhaustion attacks at the network and transport layers, as well as some application-layer DDoS events. However, it does not perform deep packet inspection or content-based filtering to identify and block SQL injection or cross-site scripting payloads. While it can be used alongside AWS WAF via automated mitigations, Shield Advanced itself does not inspect HTTP request bodies or headers for web application vulnerabilities, so it cannot satisfy the stated requirement for layer-aware attack filtering.
When this WOULD be correct
A company needs to protect against large-scale DDoS attacks targeting their infrastructure, requiring 24/7 access to the DDoS Response Team (DRT) and cost protection from scaling. AWS Shield Advanced would be the correct choice.
- ✗
Amazon GuardDuty
Why it's wrong here
Amazon GuardDuty is a threat detection service that uses machine learning to identify malicious activity and unauthorized behavior in your AWS environment. It does not perform inline filtering of incoming HTTP requests to block application-layer attacks.
When this WOULD be correct
A company wants to continuously monitor VPC Flow Logs, DNS logs, and CloudTrail events for suspicious activity, such as unusual API calls or compromised instances, and receive automated alerts. GuardDuty would be the correct managed threat detection service for this scenario.
- ✓
AWS WAF
Why this is correct
AWS WAF is a web application firewall that allows you to monitor and control HTTP and HTTPS requests forwarded to your protected resources. It integrates directly with ALB and provides managed rule sets for common threats like SQL injection and XSS. You can customize rules to meet specific requirements.
- ✗
AWS Firewall Manager
Why it's wrong here
AWS Firewall Manager simplifies the administration of firewall rules across multiple accounts and resources. It can centrally manage AWS WAF rules and AWS Shield Advanced protections, but the actual filtering of malicious traffic is performed by AWS WAF. Firewall Manager itself does not inspect or block requests.
When this WOULD be correct
A company has multiple AWS accounts and wants to centrally enforce a common set of AWS WAF rules across all their Application Load Balancers. They need a service to manage these rules from a single point, ensuring compliance and simplifying updates. In that scenario, AWS Firewall Manager would be the correct answer.
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 allows you to monitor and control HTTP and HTTPS requests forwarded to your protected resources. It integrates directly with ALB and provides managed rule sets for common threats like SQL injection and XSS. You can customize rules to meet specific requirements.
✗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 offer pre-configured rule sets for web attacks or integrate directly with ALB for request inspection.
★ When this WOULD be the correct answer
A company needs to protect against large-scale DDoS attacks targeting their infrastructure, requiring 24/7 access to the DDoS Response Team (DRT) and cost protection from scaling. AWS Shield Advanced would be the correct choice.
Why candidates choose this
Candidates may confuse Shield Advanced's DDoS protection with web application security, or assume 'managed solution' implies Shield without understanding its focus on network/transport layer attacks.
✗Amazon GuardDutyWrong answer — click to see why▾
Why this is wrong here
Amazon GuardDuty is a threat detection service that monitors for malicious activity and unauthorized behavior, but it does not inspect or block incoming HTTP requests at the application layer. It cannot prevent SQL injection or XSS attacks by itself.
★ When this WOULD be the correct answer
A company wants to continuously monitor VPC Flow Logs, DNS logs, and CloudTrail events for suspicious activity, such as unusual API calls or compromised instances, and receive automated alerts. GuardDuty would be the correct managed threat detection service for this scenario.
Why candidates choose this
Candidates may confuse GuardDuty's threat detection capabilities with web application firewall functionality, or assume that any security service can block web attacks, without understanding the specific layer of protection each service provides.
✗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 multiple accounts and resources, but it does not itself inspect and block web traffic. It relies on AWS WAF rules to do so, and the question asks for the service that directly inspects and blocks malicious traffic, which is AWS WAF.
★ When this WOULD be the correct answer
A company has multiple AWS accounts and wants to centrally enforce a common set of AWS WAF rules across all their Application Load Balancers. They need a service to manage these rules from a single point, ensuring compliance and simplifying updates. In that scenario, AWS Firewall Manager would be the correct answer.
Why candidates choose this
Candidates may confuse Firewall Manager as a security service that directly blocks attacks, when in fact it is a policy management tool that orchestrates other services like AWS WAF. The name 'Firewall Manager' suggests it manages firewalls, leading to the mistaken belief it provides the actual inspection and blocking capability.
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?”
Go deeper
Related to this question
About these practice questions
One of 988 original CLF-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 →
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 behind an Application Load Balancer (ALB). The security team wants to protect the application from common web exploits such as SQL injection and cross-site scripting (XSS), using a managed service that requires no underlying infrastructure management. Which AWS service should they use?
medium- A.AWS Shield Advanced
- ✓ B.AWS WAF
- C.Amazon Inspector
- D.Amazon GuardDuty
Why B: AWS WAF is a managed web application firewall that protects web applications from common exploits like SQL injection and cross-site scripting (XSS). It integrates directly with Application Load Balancers and requires no underlying infrastructure management, making it the correct choice for this use case.
Variation 2. Which AWS service provides a Web Application Firewall that protects web applications from common exploits like SQL injection and cross-site scripting?
easy- A.AWS Shield
- ✓ B.AWS WAF
- C.Amazon GuardDuty
- D.Security Groups
Why B: AWS WAF is a web application firewall that helps protect web applications from common web exploits like SQL injection and cross-site scripting (XSS). It allows you to create custom rules that block, allow, or monitor web requests based on conditions such as IP addresses, HTTP headers, URI strings, and request body content. This makes it the correct service for the described use case.
Variation 3. A company's public-facing web application is being attacked with SQL injection and cross-site scripting (XSS) attempts. Which AWS service should they deploy to detect and block these web application attacks?
easy- A.AWS Shield Standard
- B.Amazon GuardDuty
- ✓ C.AWS WAF
- D.Amazon Inspector
Why C: AWS WAF is a web application firewall that helps protect web applications from common web exploits like SQL injection and cross-site scripting (XSS). It allows you to create custom rules to filter and monitor HTTP(S) requests based on conditions such as IP addresses, HTTP headers, or request body patterns, and can block malicious traffic before it reaches your application.
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.