Courseiva
Security and CompliancemediumMultiple ChoiceObjective-mapped

CLF-C02 Security and Compliance Practice Question

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?

⚠ Common exam trap

Many exam-takers confuse AWS WAF with AWS Shield Advanced, assuming Shield Advanced provides application-layer filtering, but Shield Advanced focuses on DDoS mitigation at the network and transport layers, not on inspecting request payloads for SQL injection or XSS.

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 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.

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 fully managed web application firewall that operates at the application layer (Layer 7). It allows you to define web access control lists (ACLs) containing rules that filter and monitor HTTP(S) requests targeted at resources such as an Application Load Balancer. These rules are specifically designed to block common attack patterns like SQL injection and cross-site scripting (XSS), making AWS WAF the appropriate service to protect the e-commerce application from these application-layer exploits.

  • AWS Shield Advanced

    Why it's wrong here

    AWS Shield Advanced provides enhanced DDoS protection for Layer 3 and Layer 4 attacks, but it does not provide the web application firewall capabilities needed to block SQL injection or XSS at the application layer.

    When this WOULD be correct

    A company is concerned about large-scale DDoS attacks targeting their infrastructure and needs 24/7 access to the DDoS Response Team (DRT) and cost protection against scaling charges. They also want to protect against Layer 3/4 attacks and have the option to add Layer 7 protection via AWS WAF integration, but the primary requirement is advanced DDoS mitigation.

  • Amazon GuardDuty

    Why it's wrong here

    Amazon GuardDuty is a continuous security monitoring and threat detection service that analyzes AWS account activity from sources such as CloudTrail management and data events, VPC Flow Logs, and DNS query logs. It uses machine learning and anomaly detection to identify potential threats like compromised EC2 instances, suspicious API calls, or credential exfiltration, and then generates actionable findings. However, GuardDuty does not inspect or filter incoming HTTP(S) requests, so it cannot block SQL injection or XSS at the web application layer; it only detects and alerts on post-incident behavior, making it incorrect for this web application firewall need.

    When this WOULD be correct

    A company wants to continuously monitor VPC flow logs, DNS logs, and AWS CloudTrail events for suspicious activity, such as unusual API calls or potential compromise of EC2 instances, and receive automated alerts for further investigation.

  • AWS Firewall Manager

    Why it's wrong here

    AWS Firewall Manager centralizes the management of firewall rules across multiple accounts, but it does not provide the web application firewall itself. It helps deploy and manage AWS WAF rules centrally, but the service that provides the filtering is AWS WAF.

    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 Application Load Balancers. They need a service to define and apply these rules consistently. AWS Firewall Manager would be the correct answer in that scenario.

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 fully managed web application firewall that operates at the application layer (Layer 7). It allows you to define web access control lists (ACLs) containing rules that filter and monitor HTTP(S) requests targeted at resources such as an Application Load Balancer. These rules are specifically designed to block common attack patterns like SQL injection and cross-site scripting (XSS), making AWS WAF the appropriate service to protect the e-commerce application from these application-layer exploits.

AWS Shield AdvancedWrong answer — click to see why

Why this is wrong here

AWS Shield Advanced provides DDoS protection at Layer 3/4 and enhanced detection for Layer 7, but it does not include a managed web application firewall with rule sets for SQL injection or XSS, nor does it directly integrate with ALB to block traffic based on application-layer inspection.

★ When this WOULD be the correct answer

A company is concerned about large-scale DDoS attacks targeting their infrastructure and needs 24/7 access to the DDoS Response Team (DRT) and cost protection against scaling charges. They also want to protect against Layer 3/4 attacks and have the option to add Layer 7 protection via AWS WAF integration, but the primary requirement is advanced DDoS mitigation.

Why candidates choose this

Candidates may confuse Shield Advanced with a web application firewall because it offers some Layer 7 DDoS detection and can be used alongside WAF, but it does not provide the specific rule-based filtering for SQL injection and XSS that WAF offers.

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 provide a managed web application firewall to block Layer 7 attacks like SQL injection or XSS, nor does it integrate directly with an ALB to filter incoming traffic.

★ When this WOULD be the correct answer

A company wants to continuously monitor VPC flow logs, DNS logs, and AWS CloudTrail events for suspicious activity, such as unusual API calls or potential compromise of EC2 instances, and receive automated alerts for further investigation.

Why candidates choose this

Candidates may confuse GuardDuty's threat detection capabilities with web application firewall functionality, or think that detecting malicious IPs automatically blocks them, but GuardDuty only generates findings and does not actively block traffic.

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 provide Layer 7 protection like SQL injection or XSS blocking. It can manage AWS WAF rules, but the question asks for the service that directly provides the web application firewall, not the manager.

★ 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 Application Load Balancers. They need a service to define and apply these rules consistently. AWS Firewall Manager would be the correct answer in that scenario.

Why candidates choose this

Candidates may confuse Firewall Manager as a web application firewall because its name includes 'Firewall' and it can manage WAF rules, leading them to think it provides the actual protection rather than just policy management.

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?”

About these practice questions

This CLF-C02 question is part of Courseiva's 988-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 →

How Courseiva writes practice questions · Editorial policy

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.