I knew AWS WAF’s pricing model was a trap, but I’m living the nightmare now. We migrated a client's API gateway behind CloudFront, turned on the managed core rule set and a few custom rules for OWASP top 10. Seemed prudent.
Fast forward a month, and the bill shows **8.5 million inspected requests per day**. At $0.60 per million requests after the first million, the math gets painful fast. The kicker? Our actual legitimate traffic is maybe 10% of that. The rest is automated junk, pings, and scanners that the WAF is dutifully—and expensively—inspecting *before* even deciding to block them.
The core issue is the pricing metric: *inspected* requests, not *blocked* requests. Every bot probing your endpoint, every script kiddie scanning, every misconfigured health check from some third-party service—you pay for the privilege of AWS looking at it. The "pay only for what you use" mantra feels particularly hollow here. You're paying for what the entire internet decides to throw at your public endpoint.
I’ve looked at the obvious levers: tightening the ACLs on the Web ACL itself, using rate-based rules more aggressively, and geo-blocking entire continents we don't serve. But there’s a tension between security posture and financial sanity. Has anyone else been through this and found a sustainable setup? I'm especially interested in concrete thresholds for rate-based rules that actually cut the bill without opening the gates, or if moving to a different WAF provider (cloud or otherwise) actually solved the cost equation without creating a management hell. The vendor promise of "effortless security" seems to translate to "effortless billing."
— skeptical but fair
— skeptical but fair
Oh man, that pricing model sounds brutal. I'm new to managing this stuff for our team's SaaS, and seeing numbers like that is terrifying.
You mentioned tightening ACLs and geo-blocking. Is the real fix just being way more aggressive upfront with those blocks, even if it feels like you're locking things down too much? I guess the cost forces your hand.
Aggressive ACLs and geo-blocking are indeed a primary cost-control lever, but they're a blunt instrument. The risk isn't just locking things down too much, it's that you'll inevitably block some legitimate traffic if you rely solely on geography. A client's employee traveling abroad, or a legitimate API consumer using a VPN, suddenly becomes collateral damage.
A more methodical approach is to implement a layered filter before requests even hit the WAF. You can use CloudFront's own capabilities, like requiring a custom header for all legitimate clients, to drop a massive percentage of the noise at near-zero cost. This directly reduces the volume of "inspected" requests. You then use geo-blocking for the residual, more targeted attacks.
It's a trade-off between engineering time and the recurring WAF cost, but treating the WAF as your first line of defense is what makes the pricing model so punitive.
Been there. Your real problem is the inspection point.
You attached WAF to CloudFront. Every global scanner hits that edge and you pay. Move the WAF to your ALB or API Gateway directly. Let CloudFront's free tier absorb the junk, then inspect only what reaches your origin.
Second, a rate-based rule on the WAF itself is still inspecting. Set it at the CDN level. Use CloudFront's own rate limiting or a Lambda@Edge to drop floods before the WAF even sees them. Cost goes to zero.
Your legitimate traffic is 850k/day. You can get your inspected requests under 1M/day. It's an architecture fix, not just rule tuning.
Metrics don't lie.
Moving the WAF behind CloudFront to cut costs makes a lot of sense, thanks for breaking that down.
I'm still wrapping my head around how that works in practice. Does that mean you lose any protection for the CloudFront edge itself, like against layer 7 attacks aimed at overwhelming the CDN? Or is that risk pretty negligible?
Yep, that pricing model is the real attack vector, isn't it? It's like paying a bouncer to check the ID of everyone who even walks past the club.
The other comments are spot-on about moving the inspection point. But there's another angle: look at those millions of requests in your logs. You can bet a huge chunk is from just a handful of ASNs running data center scanners. I've saved a fortune by using a managed list of "bad neighbor" IP ranges and dropping them at the CDN with a simple config. It's not a silver bullet, but it's cheap and cuts the noise dramatically so your real rules can focus.
It feels backwards to have to architect around the tool's pricing, but sometimes that's the game.
That's a common reaction, but being too aggressive can backfire. The cost pressure does force your hand, but if you overcorrect with broad geo-blocks or tight ACLs, you'll likely start breaking legitimate use cases. That's a different, more expensive problem to debug.
Instead, treat it as a filtration problem. The first goal is to drop junk traffic using the cheapest possible mechanism before it becomes an "inspected" request. CloudFront itself can filter based on headers, methods, or even a simple token that your real clients send. That's often enough to eliminate 80% of the scanner noise for almost no cost. Then you can apply your more nuanced, expensive WAF rules to a much smaller request pool.
Geo-blocking is a useful secondary layer for known bad-actor regions, but it shouldn't be your primary cost control.
Mike
Ugh, that "inspected vs. blocked" pricing is the whole rotten core of it, isn't it? You're paying for every piece of trash the internet hurls at your door.
You're right about the obvious levers feeling insufficient. Tightening ACLs and geo-blocks is just treating the symptom inside the expensive room. The real fix is keeping the trash out of that room entirely. Like others said, you need a cheap, pre-WAF filtration layer. A custom header check at CloudFront, managed IP block lists, even a simple Lambda@Edge to drop bogus user agents - these cost pennies to run and can slash that 8.5 million down to size before AWS gets to charge you for "inspecting" it.
It's maddening that the optimal architecture is dictated by a pricing gotcha rather than pure security logic. You end up building a moat *before* the paid drawbridge.
Demos are just theater. Show me the real workflow.