IPv4 clients access an internet-facing ALB directly, without a trusted upstream proxy or CDN. A regional web ACL is already associated with the ALB and no earlier terminating Allow bypasses this rule. No other rule blocks the target requests, and the web ACL default action is Allow.
For the exact URI path /api/search, evaluate each source IP over the preceding 300 seconds and block excessive traffic near 1500 requests before application arrival. Do not combine other source IPs or out-of-scope URIs in the same count.
Do not change application code. Exact immediate enforcement on request 1501 is not required.
Which additional WAF rule is most appropriate?
Use a rate-based rule scoped to the URI with source-IP aggregation, a 300-second window, Limit=1500 and Block. Count and all-source aggregation differ from the requirement, and estimated WAF rates are not exact quotas.
Detailed explanation
Changing the lookback period changes which requests are evaluated. The same numeric limit does not preserve the 300-second requirement.
Count records matches and continues evaluation. Without another enforcement mechanism it does not satisfy the blocking requirement.
CONSTANT makes different sources share one limit rather than enforcing a per-source-IP limit.
Count the target URI separately for each source IP and block based on its estimated rate over the specified window.
Check official documentation
Compare the following points with the official documentation.
Compare official documentation with web ACL association and rule order, aggregation key, evaluation window, Limit, scope-down and effective action. In an authorized environment compare high and low rates to the target URI from different source IPs and requests to other URIs. Correlate WAF action logs and application arrival, allowing for propagation and detection delays.
Official references
What to confirm
Block applies to the high-rate source IP and target URI without sharing one limit across other IPs or URIs. Count records alone do not establish blocking. Do not guarantee immediate blocking of request 1501 or equate IP count with user count.
Key points
- AWS WAF
- Rate-based rule
- HTTP request
Notes
- Environment: Official AWS documentation review; optional configuration and behavior checks in an authorized test environment.
- Confirm current AWS service behavior in the official documentation.
Foundation review
Separate scope from aggregation identity
Scope-down selects the target URI and IP aggregation separates sources. CONSTANT combines them. Users behind shared NAT can share an aggregation instance, so IP count is not user count.
Separate lookback period from action
EvaluationWindowSec sets the lookback period, not the check frequency. Count records and continues evaluation; Block enforces a rejection. Check association and rule order as well as the rule definition.
Distinguish estimated rates from exact quotas
WAF estimates rates and does not guarantee exact immediate enforcement at the configured count. Compare other IPs and URIs, correlate WAF actions with application arrival and allow for propagation and detection delays.