A media streaming platform serves static content and an interactive API via an Amazon CloudFront distribution. The API traffic is routed to an Application Load Balancer (ALB) acting as the origin. During a recent event, the platform experienced a massive distributed HTTP flood attack targeting the login endpoint (/login), which overwhelmed the backend EC2 instances. The security team needs a solution to automatically detect and block these application-layer attacks at the edge with minimal administrative overhead. Which solution meets these requirements?
- Create an AWS WAF web ACL, define a rate-based rule that targets the /login path, and associate the web ACL with the CloudFront distribution.Answer
- BEnable AWS Shield Standard to automatically detect and mitigate the application-layer HTTP flood attacks targeting the /login path.
- CConfigure a stateless Network Access Control List (NACL) rule on the ALB's subnets to block the incoming traffic from the attacker IP addresses.
- DConfigure the CloudFront cache behavior for the /login path with a Time to Live (TTL) of zero to block the unauthorized requests at the edge.
Answer
Create an AWS WAF web ACL, define a rate-based rule that targets the /login path, and associate the web ACL with the CloudFront distribution.
AWS WAF provides Layer 7 protection and allows you to create rate-based rules. When associated with an Amazon CloudFront distribution, AWS WAF inspects requests at the edge and automatically blocks IP addresses that exceed a defined threshold of requests within a rolling 5-minute window. This stops the HTTP flood from reaching the origin Application Load Balancer and the backend instances.
Step-by-Step Solution
Key Concept
Mitigating Layer 7 HTTP flood attacks at the edge using AWS WAF rate-based rules associated with Amazon CloudFront.