Skip to Content
Asterrr's Handbook
Service cheat sheetsSecurity and identity cheat sheets

AWS WAF

Web ACLs, rule types, rate-based rules, managed rule groups and the quotas that matter.

Legacy

Short cheat sheet. The full exam treatment is WAF and Firewall Manager.

WAF filters HTTP and HTTPS requests at layer 7. A web ACL holds ordered rules and a default action. You attach it to CloudFront, an Application Load Balancer, API Gateway, a Cognito user pool, AppSync and other supported front doors.

HTTPSinspectallowedfull logsClientCloudFront orALBWeb ACLProtected appWAF logs
A request is evaluated against ordered rules. Each rule can allow, block, count or challenge. The default action handles the rest.

Rule types

RuleBehavior
RegularMatch conditions: IP set, geo, headers, URI, body, SQLi, XSS, regex. Action allow, block, count or challenge.
Rate-basedCounts requests per aggregation key (IP, header, forwarded IP or custom keys). Acts when the limit is exceeded. Cannot use Allow.
Managed rule groupPrebuilt, updated by AWS or Marketplace sellers.
Custom rule groupReusable set you author.

Rate-based rule details

ItemValue
Evaluation window60, 120, 300 or 600 seconds. Default 300.
Minimum limit10 requests
Rate-based rules10 per web ACL, 4 per rule group
Base cost2 WCUs, plus 30 per custom aggregation key
Scope-downNarrows what the rule counts. Required when using the Count all aggregation.

Quotas

ItemValue
Web ACLs per Region100
Max WCUs per web ACL or rule group5,000. Above 1,500 WCUs costs extra.
Body inspection for ALB and AppSync8 KB
Body inspection for CloudFront, API Gateway, Cognito, App Runner, Verified Access16 KB default, raisable to 64 KB
IPs per IP set10,000 CIDR entries
Requests per second per web ACL100,000 default

Legacy

Older material describes "conditions" combined into rules, which is WAF Classic. Current WAF uses statements inside rules. Its rate-based rule counted every five minutes. Today the window is selectable.

Exam signal

"Block SQL injection and XSS", "limit requests per IP" or "block by country or User-Agent" is WAF. "Automatically deploy a baseline of WAF rules" is the WAF Security Automations solution. Central rollout across accounts uses Firewall Manager.

Exam trap

WAF does not stop volumetric network floods. Pair with Shield. A CloudFront web ACL is global, while a Regional web ACL for ALB lives in the ALB's Region.

AWS Shield, Cognito

Further reading

On this page