Cybersecurity Research

How AWS Automatically Locks Down Leaked Cloud Credentials

Unit 42 · 21 Sept 2026
Key Takeaway Never store AWS access keys in code repositories or unsecured files, and set up log monitoring so you're alerted immediately if AWS quarantines any of your credentials.

Compromised AWS IAM access keys remain one of the most common ways attackers break into cloud environments, often because these credentials end up exposed in public GitHub repositories or unsecured environment variable files. To counter this, AWS uses an automated managed policy called AWSCompromisedKeyQuarantine, which quickly restricts the permissions of exposed keys once they are detected, limiting the damage attackers can do.

Unit 42's research traces how this policy has evolved over time in response to new attack techniques, and details AWS's partnership with GitHub's secret scanning program, which helps flag exposed keys quickly. The article also walks through a real-world exposure test to show the step-by-step timeline of how quarantine is triggered and applied, and offers guidance for security teams on how to monitor their own logs to detect quarantine events and respond faster.

While AWS's automated protections provide an important safety net, they work best alongside strong internal practices such as least-privilege permissions and careful handling of credentials in code and configuration files.

AWS IAM cloud security credential exposure incident response

Summarised by CISO AI from Unit 42. We link back to every original so you can read it yourself.