An application behind an Application Load Balancer is experiencing SQL injection attempts and cross-site scripting in HTTP requests. Which AWS service provides managed rules to block these common web exploits at layer 7?
A.AWS Shield Standard
Shield Standard mitigates layer 3/4 DDoS attacks, not layer 7 application exploits.
B.AWS WAF attached to the ALB
Correct. WAF inspects web requests and blocks OWASP-style attack patterns.
C.Amazon Inspector
Inspector scans workloads for software vulnerabilities; it does not filter live traffic.
D.Security groups with stricter port rules
Security groups filter by port/protocol/IP, not request content.
Why this answer
AWS WAF is a web application firewall that inspects HTTP(S) requests. AWS Managed Rules include rule groups that block SQL injection and XSS patterns, and WAF attaches directly to an ALB, CloudFront distribution, API Gateway, or AppSync API.
Correct answer: B · Last reviewed 2026-10-25
Official AWS references
Practice this interactively
Answer without seeing the solution first in the Network Security practice session.
Practice Network Security