<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[CloudGuard Templates]]></title><description><![CDATA[CloudGuard Templates]]></description><link>https://cloudguardtemplates.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 31 Oct 2026 04:59:46 GMT</lastBuildDate><atom:link href="https://cloudguardtemplates.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[What to do in the first hour after an AWS IAM access key leaks]]></title><description><![CDATA[You got a GitHub secret-scanning alert, a GuardDuty finding, or an email from AWS about exposed credentials. Here's a calm, ordered plan. Use at your own…]]></description><link>https://cloudguardtemplates.hashnode.dev/what-to-do-in-the-first-hour-after-an-aws-iam-access-key-leaks</link><guid isPermaLink="true">https://cloudguardtemplates.hashnode.dev/what-to-do-in-the-first-hour-after-an-aws-iam-access-key-leaks</guid><category><![CDATA[AWS]]></category><category><![CDATA[Security]]></category><category><![CDATA[incident response]]></category><category><![CDATA[Devops]]></category><dc:creator><![CDATA[CloudGuard Templates]]></dc:creator><pubDate>Thu, 15 Oct 2026 13:22:26 GMT</pubDate><content:encoded><![CDATA[<p>You got a GitHub secret-scanning alert, a GuardDuty finding, or an email from AWS about exposed credentials. Here's a calm, ordered plan.</p>
<blockquote>
<p><strong>Use at your own risk.</strong> Provided "as is", no warranty. Security changes can block access or break workloads; test in a non-production account first and keep a break-glass admin path. CloudGuard Templates is independent and <strong>not affiliated with, endorsed by, or sponsored by AWS or the Center for Internet Security (CIS)</strong>. CIS numbers follow the AWS Security Hub CSPM mapping for CIS AWS Foundations Benchmark v5.0.0; verify against the current CIS document.</p>
</blockquote>
<h2>Minutes 0-15: triage</h2>
<ul>
<li>Write down the key ID (<code>AKIA...</code>), the owning user, how you found out and the time.</li>
<li>Open an incident ticket and name one lead. One person running commands avoids chaos.</li>
</ul>
<h2>Minutes 5-20: contain</h2>
<p>Deactivate first (it's reversible), then confirm:</p>
<pre><code class="language-bash">aws iam update-access-key --user-name USER --access-key-id AKIAEXAMPLE --status Inactive
aws iam list-access-keys --user-name USER
</code></pre>
<p>If the key may have been used to assume roles, temporary sessions keep working after the key is disabled. Use <strong>Revoke active sessions</strong> on the affected roles (it attaches a deny policy using <code>aws:TokenIssueTime</code>). If needed, attach an explicit deny-all policy to the user.</p>
<h2>Minutes 20-45: investigate</h2>
<pre><code class="language-bash">aws cloudtrail lookup-events \
  --lookup-attributes AttributeKey=AccessKeyId,AttributeValue=AKIAEXAMPLE --max-results 50
</code></pre>
<p>Then check <strong>every region</strong>, not just your usual one, for:</p>
<ul>
<li>new EC2 instances or Lambda functions (crypto-mining is common)</li>
<li>new IAM users, keys, roles or policy changes (persistence)</li>
<li>S3 reads of sensitive buckets</li>
<li>GuardDuty findings and billing spikes</li>
</ul>
<h2>Minutes 45-60: eradicate</h2>
<pre><code class="language-bash">aws iam delete-access-key --user-name USER --access-key-id AKIAEXAMPLE
</code></pre>
<p>Delete anything the attacker created. Remove the secret from git history too; rotating it isn't enough if the old value is still public.</p>
<h2>After the first hour: recover and learn</h2>
<ul>
<li>Issue a new key only if truly needed. Prefer roles, and OIDC for CI/CD (e.g. GitHub Actions) so no long-lived key exists.</li>
<li>Reply to any AWS support or abuse case.</li>
<li>Write up a timeline, root cause, cost impact and fixes: secret scanning, key-age limits, SCPs, budget alarms.</li>
</ul>
<hr />
<p><em>CloudGuard Templates packages this runbook with a baseline checklist and policy templates in an <a href="https://cloudguard-templates.cloudguard-templates.workers.dev/">AWS Security Starter Kit</a>.</em></p>
]]></content:encoded></item></channel></rss>