AWS Builder Center

What an AWS Security Alert Taught Me About Actually Paying Attention

GuardDuty sent me a finding. I almost dismissed it as noise. It was not noise. Here's the story of the alert I nearly ignored, what it was actually telling me, and how I stopped treating security tools like background wallpaper.

AI Developer
I turned on GuardDuty the same week I turned on Trusted Advisor — mostly because a friend told me to, and I did not fully understand what either of them did.
For weeks, GuardDuty was quiet. No findings. I assumed this meant everything was fine, in the same way I assume my car is fine because the check-engine light isn't on. Then one Wednesday afternoon, it was not quiet anymore.
A quiet night skyline of cloud server towers with one window glowing orange like a security alarm, watched by an owl


The Notification I Almost Swiped Away

It arrived as an email with a subject line that started with "GuardDuty Finding:" followed by a string of words I did not immediately understand — something about "UnauthorizedAccess" and an IP address that was very much not mine.
My first instinct, and I am not proud of this, was to assume it was a false positive. I had read somewhere that security tools generate a lot of noise, and I had already half-decided that this was noise before I had read the actual finding.
I opened it anyway. Mostly out of guilt.

The Finding

A vault door left ajar with glowing footprints leading to a keyhole window, magnifying glass revealing binary code, sticky notes about IAM roles and least privilege

The finding said that API calls had been made from my account using a set of credentials, from a geographic location I had never logged in from, at 3 AM my time. The specific finding type was one GuardDuty uses for exactly this pattern: credentials being used in a way that doesn't match their normal behavior.
I sat with that for a second. I had not been awake at 3 AM. I had, in fact, been asleep in a way that involved a fan going and a phone on Do Not Disturb.
I checked CloudTrail. There it was — a handful of API calls: ListBuckets, DescribeInstances, a couple of IAM read calls. Nothing had been deleted. Nothing had been created. It looked less like an attack in progress and more like someone testing whether a set of credentials still worked.
I traced the credentials back to an IAM access key. An access key I had generated four months earlier, for a personal script, and then pasted into a public GitHub repository as part of a "quick test" I had fully intended to clean up afterward.
I had not cleaned it up afterward.

The Part Where I Moved Quickly

I deactivated the key within about ninety seconds of realizing what had happened. Then I deleted it entirely. Then I went back through every repository I had ever pushed — public and private — and searched for anything that looked remotely like a credential, an access key, or a connection string.
I found two more. Neither had been used maliciously, as far as GuardDuty and CloudTrail could tell. But "as far as I can tell" is not the same as "definitely fine," so I rotated all of them anyway.
I also, finally, set up an IAM policy that denied the specific actions that key had been used for outside of the roles that actually needed them — the same lesson I'd learned the hard way with IAM policies before, applied this time before something worse happened rather than after.

What the Alert Actually Taught Me

The technical lesson was straightforward: never commit credentials to a repository, use a pre-commit hook to catch it before it happens, and rotate anything that has ever been exposed even if it looks unused. That part is well-documented advice that I had read many times and apparently needed to relearn personally.
The bigger lesson was about attention. GuardDuty had been running silently for weeks, and the one time it had something important to tell me, my first reaction was to assume it was wrong. That is a dangerous default. A security tool that you've pre-decided to distrust is a security tool you've already turned off, you just haven't admitted it to yourself.
I also learned that a real security incident does not always look dramatic. There was no ransom note, no defaced website, no dramatic countdown timer. There was a quiet email, a handful of read-only API calls at an odd hour, and a small window in which the difference between "minor scare" and "actual breach" was entirely determined by how quickly I paid attention.

What I Do Now

Every access key I create gets a calendar reminder to rotate it, whether I think I need one or not. Every repository gets scanned for secrets before it's pushed, using a pre-commit hook, not my memory. GuardDuty findings get read in full, immediately, with the assumption that they are correct until I've verified otherwise — not the other way around.
And I stopped treating "no findings" as proof that nothing is wrong. Sometimes it just means nothing has been caught yet.
If you have GuardDuty running and you've never actually opened a finding end to end, do it this week. Read one you can find in the console, even a sample one, and trace it the way you'd trace a real incident. It's much better to practice on a quiet Tuesday than to learn the process for the first time at 3 AM.
Has a security alert ever turned out to be more real than you expected? I'd genuinely like to know I'm not the only one who almost swiped it away.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article