A regional web ACL is associated with an internet-facing ALB in the same account and Region. Clients access the ALB directly, with no trusted upstream proxy. The web ACL default action is Allow, and no earlier rule terminates evaluation before this rule.
The directly defined rate-based rule under audit has AggregateKeyType=IP, EvaluationWindowSec=300, and Limit=2000. Its ScopeDownStatement matches only the exact URI path /api/login, but its action is still Count for observation.
Block excessive requests to that URI before they reach the application, using each source IP over the preceding five minutes. Do not make low-rate requests from another IP or out-of-scope URIs share this rule limit. Switching from Count to enforcement is approved; an exact per-second quota is not required.
Which change and verification correctly address the audit findings?
Retain the target URI, source-IP aggregation, and 300-second window; verify the Count-to-Block change and actual enforcement. Do not equate WAF estimated rate control with an exact quota.
Detailed explanation
Without a trusted upstream proxy, arbitrary header values can permit evasion through spoofing. Requests missing the configured header are not evaluated by that rule, so missing-header behavior also matters.
Changing 300 seconds to 60 changes the lookback period. Keeping the same number 2000 does not preserve evaluation over the preceding five minutes for each source IP.
The existing aggregation criteria meet the requirement, but Count does not block. Retain the criteria and compare Block, association, rule order, and the observed final action.
CONSTANT combines every request matching the scope-down. Different sources share one limit, which is not the required per-source-IP control.
Check official documentation
Compare the following points with the official documentation.
Compare the official documentation with the ALB web ACL association, evaluation order, AggregateKeyType, EvaluationWindowSec, Limit, ScopeDownStatement, and effective action. In an available authorized test environment, compare high-rate and low-rate requests to the target URI from different source IPs and requests to other URIs. Record timestamps, WAF rule/action logs, and application arrival, allowing for propagation and detection delays.
Official references
- Official documentation 1
- Official documentation 2
- Official documentation 3
- Official documentation 4
- Official documentation 5
- Official documentation 6
- Official documentation 7
- Official documentation 8
What to confirm
Confirm Block for the high-rate source IP and target URI, without this rule blocking low-rate requests from another IP or out-of-scope URIs. Count records alone do not establish blocking. Do not promise immediate enforcement on request 2001 or immediately after a change.
Key points
- AggregateKeyType
- EvaluationWindowSec
- ScopeDownStatement
Notes
- Environment: Official WAF documentation review; optional controlled request and log checks in an authorized validation environment.
- Reviewed against the linked AWS documentation on 2026-10-21.
Foundation review
Separate scope, aggregation, and evaluation window
Aggregate only the URI path /api/login matched by ScopeDownStatement. AggregateKeyType=IP creates a separate instance for each source IP; CONSTANT combines all matching requests into one instance and does not meet the per-IP requirement. EvaluationWindowSec=300 looks back over five minutes rather than setting the check frequency. Users sharing an IP also share an aggregation instance; IP count is not user count.
Audit actions and the source of IP information
Count records a match and continues evaluation, so this rule alone does not block. Block terminates evaluation without forwarding the request to the protected resource. Check the ALB web ACL association and rule order, including earlier terminating Allow rules. This scenario has no trusted upstream proxy; do not replace the source IP with a client-controlled X-Forwarded-For value.
Compare configuration with observed enforcement
WAF rate rules estimate request rates; they do not guarantee exact enforcement such as immediately blocking request 2001. Propagation and rate detection take time, and changing aggregation settings can reset counts. Compare rule configuration, the matching rule and final action in WAF logs, and application arrival. Also check effects on other IPs and out-of-scope URIs.