A software-as-a-service (SaaS) provider hosts its API on Amazon EC2 instances behind an Application Load Balancer (ALB). The API has been experiencing recurring Layer 7 HTTP flood attacks, causing resource exhaustion on the EC2 instances. The provider wants to mitigate these attacks at the AWS network edge before they reach the ALB, without blocking legitimate client requests.
Which solution should a solutions architect recommend?
- Create an Amazon CloudFront distribution in front of the Application Load Balancer, and associate an AWS WAF web ACL containing a rate-based rule with the distribution.Answer
- BRely on AWS Shield Standard, which is enabled by default on the Application Load Balancer, to automatically inspect and block the Layer 7 HTTP flood attacks.
- CConfigure stateless Network Access Control Lists (NACLs) on the ALB subnets to automatically track connection states and block the HTTP flood traffic.
- DUpdate the security groups associated with the EC2 instances to dynamically block the source IP addresses of the HTTP flood attacks at the subnet boundary.
Answer
Create an Amazon CloudFront distribution in front of the Application Load Balancer, and associate an AWS WAF web ACL containing a rate-based rule with the distribution.
Associating an AWS WAF web ACL with an Amazon CloudFront distribution allows the rate-limiting and filtering of Layer 7 HTTP flood attacks at AWS edge locations, preventing the traffic from reaching the Application Load Balancer and the backend EC2 instances.
Step-by-Step Solution
Key Concept
Mitigating Layer 7 DDoS attacks at the edge using Amazon CloudFront and AWS WAF rate-based rules.