AWS · Security, Identity, and Compliance
AWS WAF
A web application firewall that filters HTTP requests to CloudFront, load balancers, API Gateway and more, using rules you choose.
What it is and what problem it solves
AWS WAF inspects HTTP and HTTPS requests before they reach your application and allows, blocks, counts or challenges them based on rules in a web ACL. Rules match IP addresses, countries, headers, query strings, bodies and patterns such as SQL injection and cross-site scripting. Rate-based rules limit how many requests one client can send. Managed rule groups from AWS and sellers provide ready-made protection, and Bot Control and Fraud Control handle bots and account-takeover attempts.
Web ACLs attach to CloudFront, Application Load Balancers, API Gateway REST APIs, AppSync, Cognito user pools and other supported resources.
When to use it
- Any public web application or API that should be protected from common exploits.
- You need rate limiting, IP allow or block lists, or geographic restrictions per request.
- Bots or credential-stuffing attacks hit your login pages.
When to avoid it
- Network-layer filtering in a VPC (any protocol): security groups, network ACLs or Network Firewall.
- Volumetric DDoS: Shield handles that; WAF complements it at layer 7.
- Non-HTTP traffic, which WAF does not inspect.
Limits and quotas
| Item | Value | Context | Source |
|---|---|---|---|
| Web ACL capacity units (WCU) per web ACL | 5,000 maximum Fixed limit |
Use above 1,500 WCU per web ACL is billed extra. | Source checked |
| Web ACLs per account per Region | 100 Can be raised with a quota request |
Source checked |
|
| IP addresses per IP set | 10,000 in CIDR notation Fixed limit |
Source checked |
|
| Request body inspection, ALB and AppSync | 8 KB Fixed limit |
Source checked |
|
| Request body inspection, CloudFront and API Gateway | Up to 64 KB | Default 16 KB; configurable up to 64 KB. | Source checked |
Quotas and limits change. Check the linked source before designing around a number.
Cost model
What you pay for
- Web ACLs per month, rules per month, and requests per million.
- Extras: capacity above the default WCU, body inspection beyond 16 KB, CAPTCHA and challenge responses, Bot Control and Fraud Control subscriptions and requests, and paid managed rule groups.
Where it is cost-efficient
One web ACL shared by related resources, using AWS managed rule groups.
Where costs grow
Very high request volumes, Bot Control on every request, large body inspection, and many separate web ACLs.
Cost controls and common surprises
Scope expensive rules (bot control) to paths that need them, share web ACLs, and log only what you need.
Prices differ by Region and change over time; see the pricing page linked under Sources.
Security
Controls the service provides
Managed rule groups for common exploits, rate-based rules, CAPTCHA and challenge actions, label-based rule chaining.
What you configure
Start rules in Count mode, review sampled requests, then block; keep managed rule groups updated; and protect every entry point (an ALB reachable directly bypasses a CloudFront web ACL).
Logging and monitoring
Full logs to CloudWatch Logs, S3 or Firehose; sampled requests in the console; CloudWatch metrics per rule.
Related security services
Shield, CloudFront, ALB, API Gateway, Firewall Manager for central policy.
Shared responsibility
AWS runs the filtering. You choose and tune the rules.
Common service combinations
CloudFront plus WAF at the edge; ALB plus WAF in a Region; Firewall Manager to enforce a baseline web ACL in every account; Shield Advanced.
Business application examples
- Rate-limiting a login endpoint to stop credential stuffing.
- Blocking SQL injection attempts on a legacy app that cannot be patched quickly.
Exam cues and common confusions
- Block SQL injection, XSS, bad IPs, countries, or rate-limit at layer 7: WAF.
- Where to attach: CloudFront, ALB, API Gateway REST APIs, AppSync, Cognito (not NLB).
- Same rules across many accounts: Firewall Manager.
Related
Courses and lessons
- Shield, WAF, Firewall Manager and Network Firewall · AWS Solutions Architect – Associate (SAA-C03) · Members
Services, comparisons and patterns
- AWS Shield · Service
- Amazon CloudFront · Service
- Elastic Load Balancing (ELB) · Service
- Amazon API Gateway · Service
- AWS Firewall Manager · Service
- Security groups vs network ACLs · Comparison
Sources
Independent study material, not affiliated with or endorsed by Amazon Web Services. AWS and service names are trademarks of Amazon.com, Inc. or its affiliates.