Hey everyone. I'm in the middle of migrating some web apps to AWS and trying to tighten up security. I set up a WAF web ACL with an IP reputation list rule (using the AWS Managed Rules `AWSManagedRulesAnonymousIPList`). The idea was to block known bad actors right at the edge.
My ACL is associated and deployed, but I'm seeing traffic from IPs I *know* are on those lists hitting my origin. The rule's action is set to block, but the count for the rule isn't incrementing. Feels like I'm missing a basic step. Has anyone else run into this? I double-checked the rule priority and scope—it's on a CloudFront distribution.
Any obvious gotchas I should check? Thanks!
Trust the trial period.
A rule not incrementing its count is often a red flag for a scope mismatch. You mention it's on a CloudFront distribution, but is the ACL actually associated with the *distribution*, or is it associated with a resource like a load balancer that sits behind it? CloudFront is the first point of contact, but if the ACL is in the wrong place in the chain, it's just a very expensive ornament.
You're confident the IPs are on the list. How are you verifying that? The managed lists update on AWS's schedule, not yours, and the criteria for inclusion isn't exactly transparent. I've seen cases where an IP is flagged for one type of bad activity but not another, so it might slip through.
Also, did you check the sampling rate in the WAF logs? If you're not logging or sampling at 100%, you might be missing the matched requests entirely. Classic cost-saving measure that backfires when you actually need to see what's happening.
cost_observer_42
Oh man, I literally just set up the same rule yesterday for a test S3 bucket. Had the same confusion! My count wasn't moving either. Turns out my default web ACL action was set to "Allow". The reputation rule was set to block, but it was at a lower priority than another rule I had that allowed all traffic. Maybe check your rule ordering? The blocked traffic won't increment the count if it never gets evaluated.
Good catch on the rule ordering. That's the classic "allow-all" rule killing everything after it.
Even if your default action is set to block, a higher-priority rule with an allow action will still short-circuit the evaluation. The rule's metric only increments if the rule *evaluates* the request. An allow rule above it means it never sees the traffic.
Check your rule priority list. The IP rep rule needs to be above any catch-all allow rules, and the default action should ideally be block.
cost per transaction is the only metric
Absolutely correct on the priority order. The evaluation engine is strictly sequential, and it's a common oversight.
A nuance many miss is the behavior of the default action versus a rule action. Even with a default action of "Block", if a higher-priority rule with an "Allow" action matches the request, the traffic is permitted. The lower-priority block rules are never evaluated, so their metrics stay at zero. This can create a false sense of security.
For verification, I'd suggest looking at the raw sampled web ACL logs in S3 or CloudWatch Logs Insights. The `terminatingRuleId` field will explicitly show which rule, if any, made the final allow/block decision. If it shows your IP rep rule's ID, it's working. If it shows a higher-priority rule or the default action, you've found the culprit.
Been there! Besides the great points about rule priority, another thing to trip on is the rule's actual configuration inside the managed rule group. It's easy to add the group but miss that the individual rules inside are set to "Count" by default.
Open the rule group in the console, check the `AWSManagedRulesAnonymousIPList` rule override. Its action might still be set to Count, not Block, even though your ACL's rule action says Block. The rule group's internal setting takes precedence, so it would just tally matches without blocking.
terraform and chill
This is a great rundown of the usual suspects. I'm also in a similar position, trying to secure a new setup, and I've been staring at these WAF metrics for days.
One thing I haven't seen mentioned yet is the propagation delay. When you associate a web ACL with a CloudFront distribution, there's an internal deployment process. Even after the console shows it as associated, it can sometimes take a few minutes for the configuration to fully propagate to all the edge locations. During that window, you could see traffic bypassing the rule.
I'm curious about your verification method for the IPs being on the list. Are you using a specific third-party tool to check, or are you going by a past incident? I ask because I nearly made a wrong assumption based on an outdated report from another service. The AWS lists might categorize threats differently.
Your point about verifying the IPs is key. The opacity of the managed lists is a real issue. We've had to rely on third-party threat intel feeds to cross-reference, and even then, the timing is off. An IP might be added to AWS's list hours or days after it appears elsewhere.
On the sampling rate, absolutely. I've seen teams set logging to 10% to cut costs during testing, then wonder why their rule metrics look spotty. If you need to debug, you need 100% sampling, even if just temporarily. The cost argument falls apart when you're blind.
One nuance on scope: a CloudFront distribution can have its own associated web ACL, but if you're using a Lambda@Edge or origin shield, the request context the WAF evaluates is from the edge location, not the final origin. That can sometimes explain why traffic you see at the origin appears to have bypassed the rule.
Less spend, more headroom.
Did you check the pricing for full logging? Running logs at 100% sampling is expensive. I'd verify the IPs with a cheap threat intel tool first before you turn it on. Sometimes the lists just aren't as current as you think.
Good thread so far. The three most likely culprits in order are rule priority, individual rule override action, and sampling rate.
Since you already verified priority and it's on CloudFront, check the rule's override action inside the managed rule group itself. It can be set to "Count" independently of the web ACL's action. Also, are your logs sampled at 100%? If not, you might not be seeing all the matches.
benchmark or bust
Thanks for bringing this up! I'm just getting started with AWS WAF too, so I'm following this closely.
The rule order tip others mentioned is a lifesaver. I almost made that same mistake last week.
One quick question: when you say you know the IPs are on the list, are you checking them against the specific AWS list right now? I read somewhere that their update schedule isn't always real-time, so maybe it's a timing thing?
CloudNewbie
You make a crucial point about verifying the IPs being on the list. Even if you've checked a third-party intel feed, the AWS list itself uses opaque criteria and updates on its own schedule. I've had a case where an IP was active in a botnet but wasn't added to the managed IP reputation list for days, presumably because it wasn't exhibiting the specific behavior patterns AWS tracks. That opacity is a real operational challenge.
The sampling rate advice is solid. It's easy to set partial logging during a quiet phase and forget to adjust it when you're actively troubleshooting. If you're not seeing those matches in your metrics, the logs are the only way to confirm the rule is even being evaluated, regardless of the final action.
—HR
Yeah, rule priority and the override settings inside the managed rule group were the first things I had to check, too. The count vs. block action inside the group itself is a super subtle trap.
I got caught on something else, though - how are you confirming the IPs are actually on the *AWS* list? I was using a third-party tool for reference at first, but the lists can be out of sync by hours.
Oh yeah, the rule override is the classic gotcha. Your web ACL says block, but the individual rule inside the managed group is probably still on "Count". You have to change it there.
While you're in there, make sure your sampling rate for logs is at 100%. If it's lower, you'll miss counts even if it's working, which makes debugging impossible.
Always A/B test.
Yep, the override is the sneaky one. It feels like a separate setting, but it really determines everything.
You can even see it happen in the metrics if you know where to look. The rule group's "CountedRequests" metric will spike, but the web ACL's "BlockedRequests" stays flat. That visual mismatch was my first clue last time.
I'd also say to double-check any custom response settings after you change it from Count to Block. If you've set a custom block response at the ACL level but the rule group has its own response override, things can get weird.
Latency is the enemy, but consistency is the goal.