
I Didn't Know My Site Was Being Probed Until I Turned On AWS WAF
How turning on AWS WAF in front of CloudFront turned invisible bot probes into visible, blocked traffic — and what managed rule sets and rate-based rules taught me about protecting a small app.
For a long time, I thought of my small web app as too boring to attack. It had a handful of users, no payment flow, nothing worth stealing. Then one afternoon I opened the CloudFront access logs out of curiosity and found page after page of requests I did not recognise: the same paths hit hundreds of times a minute, user agents that looked like browsers but behaved like scripts, and a steady stream of probes for /wp-admin, /.env, and /admin — paths my app does not even have. Nobody had broken in. But somebody had certainly been knocking.
That was the afternoon I learned the difference between being secure and being unnoticed. My app was not being targeted because it was valuable. It was being scanned because it was there. Automated bots do not care how small you are; they sweep the internet looking for the one misconfiguration, the one forgotten debug endpoint, the one default password. I had been relying on obscurity, and the logs showed me exactly how thin that protection was.
AWS WAF is the web application firewall that sits in front of CloudFront, an Application Load Balancer, or API Gateway, and inspects incoming requests before they reach your application. Setting it up was simpler than I expected: you create a web ACL, attach it to your distribution, and add rules. I started with the AWS managed rule sets — the common rule set that blocks the usual suspects like SQL injection and cross-site scripting, and the known bad inputs rule set. Within an hour, my logs changed. The probes were still arriving, but now they were being answered with 403s before they ever touched my code.
The part that changed how I think about it was the metrics. WAF shows you, rule by rule, how many requests were blocked and why. In my first week, the managed rules blocked a few thousand requests that would otherwise have hit my origin. Most of them were harmless scans. A few were not: repeated login attempts from a small set of IPs, and a burst of requests trying to exploit a path traversal pattern. None of them would have succeeded against my app — but each one would have cost my origin compute, cluttered my logs, and, worst of all, stayed invisible. WAF did not just block traffic; it made the traffic visible.
Then I added one custom rule of my own, and it taught me the most important lesson: rate-based rules. A single IP making more than a few hundred requests in five minutes gets temporarily blocked. This is not about stopping a determined attacker — a real attacker rotates IPs. It is about stopping the lazy, noisy bots that make up the vast majority of unwanted traffic. The first time the rule fired, I watched a scan that would have run for hours stop after five minutes. My origin's request count dropped by a third, and nothing legitimate broke. That is the trade-off that matters most for a small app: a little protection, bought cheaply, against a lot of noise.
There are limits, and I will not oversell the service. WAF is not a substitute for fixing vulnerabilities in your code; it is a filter in front of it. The managed rules cost money per request inspected, and if you enable every rule set available, the bill adds up faster than you expect — I learned to enable only the sets that matched my actual risk. Tuning takes attention too: a rule that is too aggressive will block real users, and the only way to find out is to run new rules in count mode first, watching what they would have blocked before letting them block anything. I blocked a legitimate monitoring probe on my second day because I had not whitelisted its IP. The fix took two minutes, but the lesson stuck: observe first, enforce second.
The habit that stayed with me is simple: I now check the WAF metrics every week, the way I check my billing dashboard. Not because I expect to find a dramatic attack, but because the background noise of the internet is constant, and knowing what it looks like is the cheapest security awareness there is. A firewall you never look at is just a checkbox; a firewall whose logs you read is a window into who is actually knocking on your door.
My app is still small, and still boring. The difference is that now I know it — because I can see the traffic, not because I assume nobody is looking.
What surprised you the first time you looked at your own access logs?
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article