But back to the original article, this whole thing was broken on many levels. Whoever wrote the logging function really shouldn't have been logging sensitive data like that. The logs should have been consumed by some sort of logging platform directly instead of flat files on an S3 bucket. The S3 bucket shouldn't have been publicly accessible. Someone should have reviewed this system. It's also quite possible that someone did review it and threw up red flags and was squashed by management because they had to hit a shipment date. And I'm sure there are many other reasons.
If you want to be stupid simple you can use the utility mon. You have that curl a test file from the public URL and alert if you ever get it. Also, in what universe does it take more than five minutes to fix this? "Dude, you're leaking customer info from an S3 bucket", "Shit! Which one?", "customers-bucket", "OK fixed, postmortem scheduled"
Now people are moving their infrastructure to the public clouds. With the flick of a single API call, you can expose the most sensitive data over HTTPS with no authentication and no logging. That seems to me worse than the problems of 15+ years ago. If I suggest ways to fix this, I will get responses with the word "friction", which was usually the reason people moved out of their datacenters to begin with.
Is there a practical solution to this? Could AWS do something better?