Optional ReadonlyenabledWhether per-IP rate limiting is enabled. Rate limiting is on by default; set this to false
to opt out (for example, when rate limiting is managed centrally via AWS Firewall Manager).
Optional ReadonlyevaluationTime window in seconds for counting requests. AWS WAF counts requests within this sliding window to determine if the limit is exceeded.
Optional ReadonlylimitMaximum requests allowed per IP within the evaluation window. When exceeded, the IP is blocked until the request rate drops below the limit.
Optional ReadonlyperPer-user (Authorization header) rate limiting. Adds a second rate-based rule keyed on the bearer
token so a single authenticated client cannot exhaust capacity even from many IPs. Applied only
to REGIONAL-scoped WAFs (API Gateway).
Optional ReadonlypriorityPriority for the per-IP rate limit rule in the WAF rule evaluation order. Lower numbers are evaluated first. Must be unique across all rules. Evaluated before the IP allowlist rule (priority 2) so abusive allowlisted IPs are still blocked.
Rate limiting configuration for DDoS and abuse protection.
Rate-based rules help protect against DDoS and authenticated denial-of-service by automatically blocking IP addresses (and, optionally, individual users) that exceed a request threshold within a time window.
IMPORTANT: Rate-based rules are evaluated before the IP allowlist rule so that an abusive but allowlisted IP (or token) is still blocked. The allowlist rule's terminating
Allowaction would otherwise short-circuit evaluation before any rate rule could fire. Built-in rules reserve priorities 0 (per-IP), 1 (per-user), and 2 (IP allowlist); assign anywafRulespriorities of 3 or higher (10+ recommended).See
https://docs.aws.amazon.com/waf/latest/developerguide/waf-rule-statement-type-rate-based.html
Example
Example