A company's web application is distributed globally using an Amazon CloudFront distribution protected by an AWS WAF web ACL. The application has recently experienced an HTTP flood attack targeting the feedback submission endpoint at `/submit-feedback`. A SysOps administrator needs to configure AWS WAF to block requests to `/submit-feedback` from any client IP address that exceeds 200 requests within a 5-minute period, while ensuring that legitimate traffic to other pages and endpoints on the website is not rate-limited or blocked.
Which configuration should the SysOps administrator implement to meet these requirements?
- Create an AWS WAF rate-based rule with a rate limit of 200. Configure a scope-down statement within the rule to only inspect requests where the URI path matches `/submit-feedback`, and set the rule action to Block.Answer
- BCreate an AWS WAF rate-based rule with a rate limit of 200. Associate a custom Amazon EventBridge rule that monitors AWS CloudTrail logs for WAF metrics to trigger an AWS Lambda function that dynamically adds offending client IPs to an IP set blocklist.
- CCreate a stateless Network Access Control List (NACL) rule in the VPC containing the origin servers that denies traffic from any IP address making more than 200 requests per 5 minutes to the `/submit-feedback` path.
- DConfigure an Amazon Route 53 failover routing policy that redirects traffic to a backup static page if health checks detect that the rate of requests to `/submit-feedback` exceeds 200 per 5 minutes.
Answer
Create an AWS WAF rate-based rule with a rate limit of 200. Configure a scope-down statement within the rule to only inspect requests where the URI path matches `/submit-feedback`, and set the rule action to Block.
The correct configuration is to implement a rate-based rule with a scope-down statement. AWS WAF rate-based rules track the number of incoming requests from each IP address over a sliding 5-minute window. By adding a scope-down statement matching the `/submit-feedback` URI, the administrator ensures that the rate limit of 200 is only counted against requests heading to that specific endpoint. Once a client IP exceeds this threshold, AWS WAF blocks further requests from that IP address, preventing the resource exhaustion attack while leaving other traffic untouched.
Step-by-Step Solution
Key Concept
AWS WAF Rate-Based Rules and Scope-Down Statements