Cloudflare WAF vs AWS WAF
The difference is architectural before it is functional: one is an inspecting reverse proxy with CDN and DDoS built in, the other is a rule engine you attach to a load balancer. What that means for coverage, cost and operations.
Short answer: The difference is architectural before it is functional. Cloudflare WAF is an inspecting reverse proxy with CDN and DDoS mitigation in the same pass, so one configuration covers everything behind it. AWS WAF is a rule engine you attach per resource — CloudFront, ALB, API Gateway — billed per Web ACL, per rule, per rule group and per million requests, with DDoS handled by a separate product (Shield Advanced). Neither is intrinsically “more secure”; choose by whether you want one edge with one bill, or a control surface repeated per cloud.
Start with the architectural difference, not the feature list
Cloudflare’s WAF is part of an inspecting reverse proxy. Traffic cannot reach your origin without passing through it, and the same pass-through gives you CDN caching, TLS termination and DDoS absorption. The WAF is one stage in a pipeline you are already using.
AWS WAF is a rule engine you attach to a resource — a regional ALB, an API Gateway REST API, an AppSync endpoint, or a CloudFront distribution. It inspects, it does not carry. Caching needs CloudFront separately, DDoS needs Shield separately, and both are separate line items.
That single difference explains most of the practical consequences: where each one sits on the request path, what else you have to buy, and how the bill behaves when traffic grows.
Core differences side by side
| Dimension | Cloudflare WAF | AWS WAF |
|---|---|---|
| Position | Reverse proxy in front of the origin; nothing bypasses it | Attached to ALB / API Gateway / AppSync / CloudFront; traffic outside those resources is not inspected |
| Network scope | Global anycast; one configuration applies everywhere | Regional for ALB and API Gateway; global only via CloudFront (which must be managed from us-east-1) |
| CDN | Included | Requires CloudFront, priced separately |
| DDoS | Unmetered L3/4/7 protection on all plans, included | Shield Standard (free, automatic) at L3/4; Shield Advanced at USD 3,000 per month with a one-year commitment |
| Pricing model | Plan-based: Free, Pro, Business at fixed monthly rates, Enterprise negotiated | Usage-composed: Web ACL USD 5.00/month + USD 1.00 per rule/month + USD 1.00 per rule group/month + USD 0.60 per million requests |
| Capacity accounting | Rule counts by plan (5 / 20 / 100 / 1,000 custom rules) | WCU: 1,500 included, hard cap of 5,000 per Web ACL and per rule group, listed as non-adjustable |
| Bot controls | Bot Fight Mode (Free), Super Bot Fight Mode (Pro), Bot Management (Enterprise) | Bot Control: USD 10/month per Web ACL + USD 1.00 per million (Common) or USD 10.00 per million (Targeted) |
| Visibility | cf.waf.score and sub-scores on Enterprise; class field from Business |
Logging and analytics via AWS logging destinations; capacity accounting via WCU |
| Multi-tenant | WAF for SaaS (Enterprise) with account-level policy | Typically one Web ACL per tenant or per resource, each billed separately |
| Regex | From Business upward | Available, with size limits: 200-character patterns, up to 10 patterns per set |
What each one looks like on the request path
A worked cost shape, not a quote
Take a modest but realistic case: one application, 10 million requests a month, 10 custom rules and 2 managed rule groups, no bot control, no Shield Advanced.
- AWS WAF: Web ACL 5.00 + rules 10.00 + rule groups 2.00 + requests 6.00 (10 × 0.60) ≈ USD 23 per month for the WAF itself. CloudFront request and data transfer charges, Shield Advanced and Bot Control are separate.
- Cloudflare: a fixed monthly plan — Free, Pro or Business at published rates, Enterprise negotiated — with CDN and unmetered DDoS included in that plan.
The comparison that matters is not the headline number. It is what happens during an attack. Under a usage model, a sustained flood is a bill as well as an incident; under a plan model, it is only an incident. Teams that have lived through a multi-day flood tend to weigh this heavily, and it is the reason Shield Advanced exists as a USD 3,000 monthly commitment that includes a large request allowance and L7 DDoS managed rules.
Prices are as published on the official AWS pricing pages at the time of writing and vary by region; verify current figures before procurement.
When AWS WAF is the better answer
Being fair about this matters, because the two are genuinely different tools:
- Everything already lives on AWS and your organisation requires one IAM and audit boundary. Attaching a Web ACL to an existing ALB fits that governance model better than introducing a second control plane.
- You need per-resource policy isolation. Separate Web ACLs per ALB or API are a natural way to express “these services have different rules”.
- You already carry Shield Advanced. If the commitment is sunk, adding WAF to it is coherent.
- Data residency or regional requirements make a region-scoped inspection point the correct answer rather than a global anycast edge.
Boundaries and non-applicable cases
- Neither product replaces application security. Input validation, authorisation and parameterised queries are still yours. A WAF inspects requests; it does not know what your code does with them.
- WCU is a real constraint on AWS. With a 5,000 WCU hard cap per Web ACL and per rule group, large managed rule group combinations can run out of room. Budget capacity before you commit to a rule set.
- Free-tier expectations differ. Cloudflare’s Free plan includes the Free Managed Ruleset, five custom rules and unmetered DDoS protection; the Cloudflare and OWASP managed rulesets start at Pro. AWS WAF has no free tier — the Web ACL itself is billed from the first hour.
- Running both is possible but needs ownership. A common pattern is Cloudflare at the edge and AWS WAF on internal ALBs. Decide which layer logs authoritatively and make sure the other does not strip the client IP your rules depend on.
FAQ
Is one of them more secure? Not intrinsically. Coverage and maintenance quality dominate. A well-tuned rule set on either platform beats a poorly maintained one on the other; the difference is in what each platform makes easy to cover completely.
Can AWS WAF replace my CDN? No. It inspects requests for a resource; caching and delivery are CloudFront’s job, billed separately. Cloudflare’s proxy does both in one pass.
Why does the AWS bill surprise people? Because it is composed. The Web ACL, every rule, every rule group and every million requests are separate items, and bot control, CAPTCHA attempts and requests beyond the included body-inspection limit each add their own line.
We are multi-cloud. Which one? The proxy model travels: one edge configuration covers origins wherever they live. The attach-per-resource model means repeating the work per cloud, with a separate bill each time.
Related reading
Sources
Official Cloudflare documentation. Where this article mentions availability, quotas or limits, these pages are the source of truth. Cloudflare features change over time — confirm what is visible in your dashboard before committing to a design.
- aws.amazon.com/waf/pricing/
- aws.amazon.com/shield/pricing/
- docs.aws.amazon.com/waf/latest/developerguide/limits.html
- docs.aws.amazon.com/waf/latest/developerguide/aws-waf-capacity-units.html
- developers.cloudflare.com/waf/
- developers.cloudflare.com/waf/custom-rules/
- developers.cloudflare.com/ddos-protection/about/
- developers.cloudflare.com/waf/detections/attack-score/