<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shuwa</title>
    <description>The latest articles on DEV Community by Shuwa (@shuwacloud).</description>
    <link>https://dev.to/shuwacloud</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4233183%2F9da05e10-e93e-4ee2-aa45-457df73a75fa.png</url>
      <title>DEV Community: Shuwa</title>
      <link>https://dev.to/shuwacloud</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shuwacloud"/>
    <language>en</language>
    <item>
      <title>Leaked Your AWS Access Key? What to Do in the First 30 Minutes</title>
      <dc:creator>Shuwa</dc:creator>
      <pubDate>Mon, 09 Nov 2026 13:23:13 +0000</pubDate>
      <link>https://dev.to/shuwacloud/leaked-your-aws-access-key-what-to-do-in-the-first-30-minutes-2g27</link>
      <guid>https://dev.to/shuwacloud/leaked-your-aws-access-key-what-to-do-in-the-first-30-minutes-2g27</guid>
      <description>&lt;p&gt;You just realized your AWS access key is in a public GitHub repo. Maybe in a &lt;code&gt;.env&lt;/code&gt; file, maybe hardcoded in a script you pushed late at night.&lt;/p&gt;

&lt;p&gt;Your stomach drops. Take a breath. This post is a calm, ordered checklist for the next 30 minutes.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Why speed matters:&lt;/strong&gt; in honeypot experiments, attackers found and used AWS keys pushed to public GitHub repos within &lt;strong&gt;1 to 2 minutes&lt;/strong&gt;. Assume your key has already been seen.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Step 0: Don't just delete the commit
&lt;/h2&gt;

&lt;p&gt;Your first instinct might be to delete the file or force-push over the commit. Do it later if you want, but &lt;strong&gt;it doesn't fix anything&lt;/strong&gt;. Scanners copy keys within minutes, and forks or caches may keep the old commit around.&lt;/p&gt;

&lt;p&gt;The key itself is what needs to die. Go straight to Step 1.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1: Deactivate the key (2 minutes)
&lt;/h2&gt;

&lt;p&gt;In the console: &lt;strong&gt;IAM → Users → (your user) → Security credentials → Access keys&lt;/strong&gt;, then choose &lt;strong&gt;Actions → Deactivate&lt;/strong&gt; on the leaked key.&lt;/p&gt;

&lt;p&gt;Or from the CLI, using a &lt;em&gt;different&lt;/em&gt;, trusted credential:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws iam update-access-key &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--user-name&lt;/span&gt; my-user &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--access-key-id&lt;/span&gt; AKIAIOSFODNN7EXAMPLE &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--status&lt;/span&gt; Inactive
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Deactivating instead of deleting right away has one benefit: if something you rely on breaks, you'll know which key it was using. For most solo projects, nothing important breaks, and you can delete the key in Step 5.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Already got an email from AWS?&lt;/strong&gt; AWS and GitHub work together to detect exposed keys. AWS may have already attached a policy called &lt;strong&gt;AWSCompromisedKeyQuarantineV3&lt;/strong&gt; to your IAM user and opened a support case. In one test by Palo Alto Networks' Unit 42, this happened about &lt;strong&gt;10 seconds&lt;/strong&gt; after the push. That policy blocks some risky actions, but it does &lt;strong&gt;not&lt;/strong&gt; disable the key. You still need to do everything in this post. AWS also advises keeping that policy in place until you've finished cleaning up, since removing it early can affect whether you're eligible for billing concessions.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Step 2: Find out what the key did (10 minutes)
&lt;/h2&gt;

&lt;p&gt;Open &lt;strong&gt;CloudTrail → Event history&lt;/strong&gt;, set the filter to &lt;strong&gt;AWS access key&lt;/strong&gt;, and paste the leaked key ID. Event history covers the &lt;strong&gt;last 90 days&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Look especially for these event names:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Event name&lt;/th&gt;
&lt;th&gt;Why it's alarming&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;RunInstances&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Someone launched EC2 instances (often large ones, for crypto mining)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;CreateUser&lt;/code&gt;, &lt;code&gt;CreateAccessKey&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Someone created a new identity or key to keep access after you revoke this one&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;CreateLoginProfile&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Someone gave a user a console password&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;AttachUserPolicy&lt;/code&gt;, &lt;code&gt;PutUserPolicy&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Someone granted extra permissions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GetCallerIdentity&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Someone checked whether the key works. Usually the very first thing attackers do&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Important: CloudTrail Event history is per region.&lt;/strong&gt; Check every region you see activity in. IAM events (like &lt;code&gt;CreateUser&lt;/code&gt;) show up in &lt;strong&gt;US East (N. Virginia)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;From the CLI, this lists recent events for the key in one region:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws cloudtrail lookup-events &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--region&lt;/span&gt; us-east-1 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--lookup-attributes&lt;/span&gt; &lt;span class="nv"&gt;AttributeKey&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;AccessKeyId,AttributeValue&lt;span class="o"&gt;=&lt;/span&gt;AKIAIOSFODNN7EXAMPLE &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="s2"&gt;"Events[].[EventTime,EventName,Username]"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--output&lt;/span&gt; table
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To sweep all regions at once:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;for &lt;/span&gt;r &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;aws ec2 describe-regions &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="s2"&gt;"Regions[].RegionName"&lt;/span&gt; &lt;span class="nt"&gt;--output&lt;/span&gt; text&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"== &lt;/span&gt;&lt;span class="nv"&gt;$r&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
  aws cloudtrail lookup-events &lt;span class="nt"&gt;--region&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$r&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;--lookup-attributes&lt;/span&gt; &lt;span class="nv"&gt;AttributeKey&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;AccessKeyId,AttributeValue&lt;span class="o"&gt;=&lt;/span&gt;AKIAIOSFODNN7EXAMPLE &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="s2"&gt;"Events[].[EventTime,EventName]"&lt;/span&gt; &lt;span class="nt"&gt;--output&lt;/span&gt; text
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 3: Shut down anything you didn't create (10 minutes)
&lt;/h2&gt;

&lt;p&gt;Attackers love regions you never use. Check them all:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Console:&lt;/strong&gt; Resource Groups &amp;amp; Tag Editor → &lt;strong&gt;Tag Editor&lt;/strong&gt; → Regions: &lt;strong&gt;All regions&lt;/strong&gt; → Resource types: &lt;strong&gt;All supported resource types&lt;/strong&gt; → Search.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CLI:&lt;/strong&gt; list EC2 instances in every region:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;for &lt;/span&gt;r &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;aws ec2 describe-regions &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="s2"&gt;"Regions[].RegionName"&lt;/span&gt; &lt;span class="nt"&gt;--output&lt;/span&gt; text&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"== &lt;/span&gt;&lt;span class="nv"&gt;$r&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
  aws ec2 describe-instances &lt;span class="nt"&gt;--region&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$r&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="s2"&gt;"Reservations[].Instances[].[InstanceId,InstanceType,State.Name,LaunchTime]"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;--output&lt;/span&gt; text
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Terminate anything you don't recognize. Also check for unexpected Lambda functions, spot requests, and EC2 launch templates, which attackers sometimes use to relaunch instances after you delete them.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 4: Hunt for backdoors (5 minutes)
&lt;/h2&gt;

&lt;p&gt;Revoking one key doesn't help if the attacker created another way in.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;IAM → Users:&lt;/strong&gt; any users you don't recognize? Delete them (after noting their names for your support case).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;For every user:&lt;/strong&gt; check &lt;strong&gt;Security credentials&lt;/strong&gt; for access keys you didn't create.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IAM → Roles and Policies:&lt;/strong&gt; anything new or recently modified?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Credential report:&lt;/strong&gt; shows when every password and key was last used:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws iam generate-credential-report
aws iam get-credential-report &lt;span class="nt"&gt;--query&lt;/span&gt; Content &lt;span class="nt"&gt;--output&lt;/span&gt; text | &lt;span class="nb"&gt;base64&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Root user:&lt;/strong&gt; change the password and confirm MFA is on.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Step 5: Replace the key properly
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Delete the leaked key:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws iam delete-access-key &lt;span class="nt"&gt;--user-name&lt;/span&gt; my-user &lt;span class="nt"&gt;--access-key-id&lt;/span&gt; AKIAIOSFODNN7EXAMPLE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;If an app genuinely needs credentials, create a new key &lt;strong&gt;and store it outside your code&lt;/strong&gt; (environment variables that never get committed, or a secrets manager).&lt;/li&gt;
&lt;li&gt;Better yet, avoid long-term keys entirely:

&lt;ul&gt;
&lt;li&gt;Code running &lt;strong&gt;on AWS&lt;/strong&gt; (EC2, Lambda, ECS) should use an &lt;strong&gt;IAM role&lt;/strong&gt;, not a key.&lt;/li&gt;
&lt;li&gt;For your own laptop, use &lt;strong&gt;IAM Identity Center&lt;/strong&gt; (&lt;code&gt;aws configure sso&lt;/code&gt;) for short-lived credentials.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Step 6: Deal with the bill
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;strong&gt;Billing and Cost Management → Bills&lt;/strong&gt; or Cost Explorer to see what the attacker cost you.&lt;/li&gt;
&lt;li&gt;If AWS opened a support case about the exposure, &lt;strong&gt;reply in that case&lt;/strong&gt; with what you've done. If not, open one: &lt;strong&gt;Support Center → Create case → Account and billing&lt;/strong&gt;. Billing support is free on every plan, including Basic.&lt;/li&gt;
&lt;li&gt;Be specific: when the key leaked, what you deactivated and deleted, which resources you terminated, and what you've changed to prevent it happening again.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;AWS reviews billing adjustments &lt;strong&gt;case by case&lt;/strong&gt;. Many developers report getting a courtesy credit for a first incident, but it's never guaranteed, and replies can take days.&lt;/p&gt;




&lt;h2&gt;
  
  
  Prevent the next one
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Never put keys in code.&lt;/strong&gt; Add &lt;code&gt;.env&lt;/code&gt; and credential files to &lt;code&gt;.gitignore&lt;/code&gt; before your first commit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Turn on GitHub secret scanning and push protection&lt;/strong&gt; for your repos, so a key gets blocked before it's pushed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prefer roles and IAM Identity Center&lt;/strong&gt; over long-term access keys.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never create access keys for the root user.&lt;/strong&gt; Turn on MFA for it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set a budget alert and Cost Anomaly Detection&lt;/strong&gt; so a surprise shows up in your inbox, not on your credit card statement.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The 30-minute checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Deactivate the leaked key&lt;/li&gt;
&lt;li&gt;[ ] Check CloudTrail for that key in every active region (IAM events: N. Virginia)&lt;/li&gt;
&lt;li&gt;[ ] Terminate unknown resources in all regions&lt;/li&gt;
&lt;li&gt;[ ] Remove unknown IAM users, keys, roles, and policies&lt;/li&gt;
&lt;li&gt;[ ] Change the root password and confirm MFA&lt;/li&gt;
&lt;li&gt;[ ] Delete the leaked key and replace it with a role or a properly stored key&lt;/li&gt;
&lt;li&gt;[ ] Reply to (or open) an Account and billing support case&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bookmark this. Hopefully you never need it.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;A budget alert won't stop a leak, but it can catch one before the bill gets huge. If you want the full prevention routine, I wrote a short PDF guide: a 30-minute setup (MFA, budget alerts, anomaly detection, an all-regions sweep) and a 10-minute monthly checklist. It's $9 on Gumroad: &lt;a href="https://shuwacloud.gumroad.com/l/aws-bill-shock" rel="noopener noreferrer"&gt;Stop AWS Bill Shock&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;More in this series: &lt;a href="https://dev.to/shuwacloud/5-reasons-your-aws-bill-keeps-growing-even-when-nobody-uses-your-app-380"&gt;5 Reasons Your AWS Bill Keeps Growing&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Sources&lt;/strong&gt; (checked November 2026)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://repost.aws/knowledge-center/potential-account-compromise" rel="noopener noreferrer"&gt;AWS re:Post: What can I do if I notice unauthorized activity in my AWS account?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://repost.aws/knowledge-center/troubleshoot-iam-account-activity" rel="noopener noreferrer"&gt;AWS re:Post: How do I troubleshoot unusual resource activity in my AWS account?&lt;/a&gt; (CloudTrail event history, 90 days)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://repost.aws/knowledge-center/manage-iam-access-keys-securely" rel="noopener noreferrer"&gt;AWS re:Post: Manage IAM access keys securely&lt;/a&gt; (keep the quarantine policy until remediation is complete)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSCompromisedKeyQuarantineV3.html" rel="noopener noreferrer"&gt;AWS Managed Policy Reference: AWSCompromisedKeyQuarantineV3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://unit42.paloaltonetworks.com/detecting-exposed-aws-iam-credentials/" rel="noopener noreferrer"&gt;Unit 42: Detecting exposed AWS IAM credentials&lt;/a&gt; (quarantine attached in about 10 seconds)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://orca.security/resources/press-releases/orca-security-2023-honeypotting-in-the-cloud-report/" rel="noopener noreferrer"&gt;Orca Security: 2023 Honeypotting in the Cloud Report&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.comparitech.com/blog/information-security/github-honeypot/" rel="noopener noreferrer"&gt;Comparitech: AWS credentials on GitHub abused within 1 minute&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>security</category>
      <category>devops</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to Read Your AWS Bill: A Plain-English Decoder for Usage Types</title>
      <dc:creator>Shuwa</dc:creator>
      <pubDate>Sun, 08 Nov 2026 11:05:33 +0000</pubDate>
      <link>https://dev.to/shuwacloud/how-to-read-your-aws-bill-a-plain-english-decoder-for-usage-types-1d0g</link>
      <guid>https://dev.to/shuwacloud/how-to-read-your-aws-bill-a-plain-english-decoder-for-usage-types-1d0g</guid>
      <description>&lt;p&gt;Your AWS bill says you spent $47 last month. On what, exactly?&lt;/p&gt;

&lt;p&gt;The Bills page groups charges by service, which helps a little. But the real answer hides in &lt;strong&gt;usage types&lt;/strong&gt;: cryptic codes like &lt;code&gt;USW2-NatGateway-Hours&lt;/code&gt; or &lt;code&gt;BoxUsage:t3.micro&lt;/code&gt;. Once you can read them, most "mystery" charges explain themselves in about five minutes.&lt;/p&gt;

&lt;p&gt;This post is a decoder. No prior billing knowledge needed.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1: Show your costs by usage type
&lt;/h2&gt;

&lt;p&gt;The console's Bills page is too coarse. Use &lt;strong&gt;Cost Explorer&lt;/strong&gt; instead (viewing it in the console is free):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;strong&gt;Billing and Cost Management → Cost Explorer&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Set the date range to the &lt;strong&gt;last 3 months&lt;/strong&gt; and granularity to &lt;strong&gt;Monthly&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Group by&lt;/strong&gt;, choose &lt;strong&gt;Usage type&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You now get a chart and table of every usage type, sorted by cost. Three months lets you spot what's &lt;em&gt;growing&lt;/em&gt;, not just what's big.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Tip: If one service dominates, add a &lt;strong&gt;Service&lt;/strong&gt; filter (for example, EC2-Other) and keep grouping by usage type. EC2-Other is a common hiding place for NAT Gateway, EBS, and data transfer charges.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Step 2: Understand the anatomy of a usage type
&lt;/h2&gt;

&lt;p&gt;Most usage types follow this pattern:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[region code]-[what you're charged for]:[detail]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;USW2-NatGateway-Hours&lt;/code&gt; → &lt;strong&gt;US West (Oregon)&lt;/strong&gt; · NAT Gateway · hours it existed&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;APN1-BoxUsage:t3.micro&lt;/code&gt; → &lt;strong&gt;Tokyo&lt;/strong&gt; · EC2 instance hours · instance type t3.micro&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;EUC1-EBS:VolumeUsage.gp3&lt;/code&gt; → &lt;strong&gt;Frankfurt&lt;/strong&gt; · EBS storage · gp3 volumes&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Region codes you'll see most
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Code&lt;/th&gt;
&lt;th&gt;Region&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;USE1&lt;/td&gt;
&lt;td&gt;US East (N. Virginia)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;USE2&lt;/td&gt;
&lt;td&gt;US East (Ohio)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;USW1&lt;/td&gt;
&lt;td&gt;US West (N. California)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;USW2&lt;/td&gt;
&lt;td&gt;US West (Oregon)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CAN1&lt;/td&gt;
&lt;td&gt;Canada (Central)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;EU&lt;/td&gt;
&lt;td&gt;Europe (Ireland)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;EUC1&lt;/td&gt;
&lt;td&gt;Europe (Frankfurt)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;EUW2&lt;/td&gt;
&lt;td&gt;Europe (London)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;APN1&lt;/td&gt;
&lt;td&gt;Asia Pacific (Tokyo)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;APS1&lt;/td&gt;
&lt;td&gt;Asia Pacific (Singapore)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;APS2&lt;/td&gt;
&lt;td&gt;Asia Pacific (Sydney)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SAE1&lt;/td&gt;
&lt;td&gt;South America (São Paulo)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two quirks worth knowing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;US East (N. Virginia) often has no prefix at all.&lt;/strong&gt; For many services, a charge there shows up as plain &lt;code&gt;BoxUsage:t3.micro&lt;/code&gt; or &lt;code&gt;TimedStorage-ByteHrs&lt;/code&gt; instead of &lt;code&gt;USE1-...&lt;/code&gt;. If a usage type has no region code, N. Virginia is the usual suspect.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Two region codes mean data moved between regions.&lt;/strong&gt; &lt;code&gt;USE2-USW2-AWS-Out-Bytes&lt;/code&gt; is data sent from Ohio to Oregon.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Step 3: Decode the usual suspects
&lt;/h2&gt;

&lt;p&gt;These are the usage types small accounts run into most often. Region prefixes are left off for readability.&lt;/p&gt;

&lt;h3&gt;
  
  
  Compute and databases
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Usage type&lt;/th&gt;
&lt;th&gt;What it means&lt;/th&gt;
&lt;th&gt;Billed by&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;BoxUsage:t3.micro&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;An EC2 instance running (On-Demand)&lt;/td&gt;
&lt;td&gt;Hours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;InstanceUsage:db.t3.micro&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;An RDS database instance running&lt;/td&gt;
&lt;td&gt;Hours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Lambda-GB-Second&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Lambda compute time × memory&lt;/td&gt;
&lt;td&gt;GB-seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;Request&lt;/code&gt; (under Lambda)&lt;/td&gt;
&lt;td&gt;Lambda invocations&lt;/td&gt;
&lt;td&gt;Requests&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Storage
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Usage type&lt;/th&gt;
&lt;th&gt;What it means&lt;/th&gt;
&lt;th&gt;Billed by&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;EBS:VolumeUsage.gp3&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;EBS disk space (gp3), attached or not&lt;/td&gt;
&lt;td&gt;GB-month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;EBS:SnapshotUsage&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;EBS snapshots&lt;/td&gt;
&lt;td&gt;GB-month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;TimedStorage-ByteHrs&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;S3 storage (Standard)&lt;/td&gt;
&lt;td&gt;GB-month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;Requests-Tier1&lt;/code&gt; / &lt;code&gt;Requests-Tier2&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;S3 requests (Tier1 ≈ PUT, COPY, POST, LIST; Tier2 ≈ GET and most others)&lt;/td&gt;
&lt;td&gt;Requests&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Networking (where surprises usually live)
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Usage type&lt;/th&gt;
&lt;th&gt;What it means&lt;/th&gt;
&lt;th&gt;Billed by&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;NatGateway-Hours&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A NAT Gateway existing, even with zero traffic&lt;/td&gt;
&lt;td&gt;Hours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;NatGateway-Bytes&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Data processed by a NAT Gateway&lt;/td&gt;
&lt;td&gt;GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;PublicIPv4:InUseAddress&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Public IPv4 addresses attached to resources&lt;/td&gt;
&lt;td&gt;Hours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;PublicIPv4:IdleAddress&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Public IPv4 addresses (Elastic IPs) attached to nothing&lt;/td&gt;
&lt;td&gt;Hours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;DataTransfer-Out-Bytes&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Data sent from AWS to the internet&lt;/td&gt;
&lt;td&gt;GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;DataTransfer-Regional-Bytes&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Data moving between Availability Zones in the same region&lt;/td&gt;
&lt;td&gt;GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;LoadBalancerUsage&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A load balancer existing&lt;/td&gt;
&lt;td&gt;Hours&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Monitoring
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Usage type&lt;/th&gt;
&lt;th&gt;What it means&lt;/th&gt;
&lt;th&gt;Billed by&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;DataProcessing-Bytes&lt;/code&gt; (under CloudWatch)&lt;/td&gt;
&lt;td&gt;Logs ingested into CloudWatch Logs&lt;/td&gt;
&lt;td&gt;GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;TimedStorage-ByteHrs&lt;/code&gt; (under CloudWatch)&lt;/td&gt;
&lt;td&gt;Logs stored in CloudWatch Logs&lt;/td&gt;
&lt;td&gt;GB-month&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;Notice the pattern: anything ending in &lt;strong&gt;Hours&lt;/strong&gt; usually means "you pay while it exists." Those are the first lines to check when nobody is using your app.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Step 4: Turn a line item into an action
&lt;/h2&gt;

&lt;p&gt;Once you've found your top 3 usage types, this table covers the most common fixes:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;If you see a lot of...&lt;/th&gt;
&lt;th&gt;It usually means...&lt;/th&gt;
&lt;th&gt;Try this&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;NatGateway-Hours&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A NAT Gateway left over from a tutorial or an old VPC&lt;/td&gt;
&lt;td&gt;Delete it if private subnets don't need internet access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;NatGateway-Bytes&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Traffic to AWS services going through the NAT&lt;/td&gt;
&lt;td&gt;Add free &lt;strong&gt;gateway endpoints&lt;/strong&gt; for S3 and DynamoDB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;PublicIPv4:IdleAddress&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Elastic IPs you allocated but don't use&lt;/td&gt;
&lt;td&gt;Release them&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;EBS:VolumeUsage.*&lt;/code&gt; with few instances&lt;/td&gt;
&lt;td&gt;Disks left behind after instances were terminated&lt;/td&gt;
&lt;td&gt;Delete unattached volumes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;EBS:SnapshotUsage&lt;/code&gt; growing every month&lt;/td&gt;
&lt;td&gt;Automated snapshots with no cleanup&lt;/td&gt;
&lt;td&gt;Set a retention policy (for example, with Data Lifecycle Manager)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;DataTransfer-Regional-Bytes&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Chatty traffic across Availability Zones&lt;/td&gt;
&lt;td&gt;Keep small, non-critical workloads in one AZ&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;DataProcessing-Bytes&lt;/code&gt; (CloudWatch)&lt;/td&gt;
&lt;td&gt;Verbose logging&lt;/td&gt;
&lt;td&gt;Lower log levels and set log retention&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A region code you never use&lt;/td&gt;
&lt;td&gt;Something launched in the wrong region&lt;/td&gt;
&lt;td&gt;Search &lt;strong&gt;All regions&lt;/strong&gt; in Tag Editor&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Reading the bill tells you what &lt;em&gt;already&lt;/em&gt; happened. If you'd rather get warned &lt;em&gt;before&lt;/em&gt; it happens, my $9 guide walks through budget alerts, anomaly detection, and an all-regions sweep in about 30 minutes: &lt;a href="https://shuwacloud.gumroad.com/l/aws-bill-shock" rel="noopener noreferrer"&gt;Stop AWS Bill Shock&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Bonus: the same view from the CLI
&lt;/h2&gt;

&lt;p&gt;If you prefer the terminal, this prints last month's cost by usage type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws ce get-cost-and-usage &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--time-period&lt;/span&gt; &lt;span class="nv"&gt;Start&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;2026-10-01,End&lt;span class="o"&gt;=&lt;/span&gt;2026-11-01 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--granularity&lt;/span&gt; MONTHLY &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--metrics&lt;/span&gt; UnblendedCost &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--group-by&lt;/span&gt; &lt;span class="nv"&gt;Type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;DIMENSION,Key&lt;span class="o"&gt;=&lt;/span&gt;USAGE_TYPE &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="s2"&gt;"ResultsByTime[0].Groups[?to_number(Metrics.UnblendedCost.Amount) &amp;gt; &lt;/span&gt;&lt;span class="se"&gt;\`&lt;/span&gt;&lt;span class="s2"&gt;0.01&lt;/span&gt;&lt;span class="se"&gt;\`&lt;/span&gt;&lt;span class="s2"&gt;].[Keys[0], Metrics.UnblendedCost.Amount]"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--output&lt;/span&gt; text | &lt;span class="nb"&gt;sort&lt;/span&gt; &lt;span class="nt"&gt;-t&lt;/span&gt;&lt;span class="s1"&gt;$'&lt;/span&gt;&lt;span class="se"&gt;\t&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt; &lt;span class="nt"&gt;-k2&lt;/span&gt; &lt;span class="nt"&gt;-gr&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-20&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Change the dates to the month you want. One heads-up: unlike the console, &lt;strong&gt;Cost Explorer API calls cost $0.01 per request&lt;/strong&gt;. Fine for occasional checks, but don't put it in a loop that runs every minute.&lt;/p&gt;




&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;Your AWS bill stops being scary once you can read it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open Cost Explorer and &lt;strong&gt;group by usage type&lt;/strong&gt; over 3 months.&lt;/li&gt;
&lt;li&gt;Read each code as &lt;strong&gt;region + what + detail&lt;/strong&gt;. No prefix usually means N. Virginia.&lt;/li&gt;
&lt;li&gt;Look hardest at anything billed in &lt;strong&gt;Hours&lt;/strong&gt;. That's what you pay for just by existing.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Do this once a month, and surprise charges become rare.&lt;/p&gt;




&lt;p&gt;This post helps you explain last month's bill. My short PDF guide helps you make sure next month's has no surprises:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A 30-minute setup plan: MFA, budget alerts, anomaly detection, an all-regions sweep&lt;/li&gt;
&lt;li&gt;Copy-paste CLI commands for every step&lt;/li&gt;
&lt;li&gt;A 10-minute monthly checklist&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://shuwacloud.gumroad.com/l/aws-bill-shock" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;Get Stop AWS Bill Shock ($9)&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Previous post: &lt;a href="https://dev.to/shuwacloud/5-reasons-your-aws-bill-keeps-growing-even-when-nobody-uses-your-app-380"&gt;5 Reasons Your AWS Bill Keeps Growing (Even When Nobody Uses Your App)&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Sources&lt;/strong&gt; (checked November 2026)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-region-billing-codes.html" rel="noopener noreferrer"&gt;AWS Region billing codes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/aws-usage-report-understand.html" rel="noopener noreferrer"&gt;Amazon S3: Understanding your AWS billing and usage reports&lt;/a&gt; (US East prefix omitted)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/vpc/pricing/" rel="noopener noreferrer"&gt;Amazon VPC pricing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/aws-cost-management/aws-cost-explorer/pricing/" rel="noopener noreferrer"&gt;AWS Cost Explorer pricing&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>cloud</category>
      <category>beginners</category>
    </item>
    <item>
      <title>5 Reasons Your AWS Bill Keeps Growing (Even When Nobody Uses Your App)</title>
      <dc:creator>Shuwa</dc:creator>
      <pubDate>Sun, 08 Nov 2026 06:14:42 +0000</pubDate>
      <link>https://dev.to/shuwacloud/5-reasons-your-aws-bill-keeps-growing-even-when-nobody-uses-your-app-380</link>
      <guid>https://dev.to/shuwacloud/5-reasons-your-aws-bill-keeps-growing-even-when-nobody-uses-your-app-380</guid>
      <description>&lt;p&gt;You built a small side project on AWS. Traffic is basically zero. Yet every month the bill creeps up, and the line items look like error codes: USW2-NatGateway-Hours, USW2-PublicIPv4:InUseAddress...&lt;/p&gt;

&lt;p&gt;If that sounds familiar, you're not bad at AWS. Most surprise bills come from the same five causes, and each one takes only a few minutes to check.&lt;/p&gt;

&lt;p&gt;Note: Prices below are AWS list prices for US East (N. Virginia), checked in November 2026. Other regions can cost more, and AWS updates prices over time. Always confirm on the official pricing pages (links at the end).&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Resources that charge just for existing&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Many AWS services bill by the hour, not by how much you use them. If the resource exists, the meter is running.&lt;/p&gt;

&lt;p&gt;The classic example is the NAT Gateway:&lt;/p&gt;

&lt;p&gt;$0.045 per hour, which is about $32.85 a month, even with zero traffic&lt;br&gt;
Plus $0.045 per GB of data it processes&lt;/p&gt;

&lt;p&gt;Lots of beginner tutorials create a NAT Gateway so private subnets can reach the internet. The tutorial ends, the gateway stays.&lt;/p&gt;

&lt;p&gt;Other usual suspects:&lt;/p&gt;

&lt;p&gt;Public IPv4 addresses. Since February 1, 2024, every public IPv4 address costs $0.005 per hour (about $3.60 a month), whether it's attached to something or not.&lt;br&gt;
EBS volumes from instances you stopped or terminated. The disk can outlive the server.&lt;br&gt;
Load balancers with no traffic.&lt;br&gt;
RDS databases left running 24/7 for a test you finished weeks ago.&lt;/p&gt;

&lt;p&gt;Quick check: find unattached EBS volumes and unused Elastic IPs in your current region:&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
aws ec2 describe-volumes --filters Name=status,Values=available \&lt;br&gt;
  --query "Volumes[].[VolumeId,Size]" --output text&lt;/p&gt;

&lt;p&gt;aws ec2 describe-addresses \&lt;br&gt;
  --query "Addresses[?AssociationId==null].[PublicIp,AllocationId]" --output text&lt;/p&gt;

&lt;p&gt;If anything shows up that you don't need, delete it. Stopping isn't always enough.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Resources hiding in another region&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The AWS console only shows resources in the region you currently have selected.&lt;/p&gt;

&lt;p&gt;So if a tutorial had you build in N. Virginia (us-east-1) but you normally work in Oregon (us-west-2), those first resources seem to vanish. They haven't. They're still running, and still billing.&lt;/p&gt;

&lt;p&gt;Quick check (console): open Resource Groups &amp;amp; Tag Editor → Tag Editor, set Regions to All regions and Resource types to All supported resource types, then search. Anything you don't recognize deserves a closer look.&lt;/p&gt;

&lt;p&gt;Quick check (CLI): list EC2 instances in every region:&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
for r in $(aws ec2 describe-regions --query "Regions[].RegionName" --output text); do&lt;br&gt;
  echo "== $r"&lt;br&gt;
  aws ec2 describe-instances --region "$r" \&lt;br&gt;
    --query "Reservations[].Instances[].[InstanceId,State.Name]" --output text&lt;br&gt;
done&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Data transfer and logs that add up quietly&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Data transfer out: sending data from AWS to the internet costs money. You get 100 GB per month free, but that allowance is shared across all regions combined, not per region. Serving images or video straight from an EC2 instance can burn through it quickly.&lt;/p&gt;

&lt;p&gt;CloudWatch Logs: ingesting logs costs $0.50 per GB, plus about $0.03 per GB per month to store them. Two things make this sneaky:&lt;/p&gt;

&lt;p&gt;Verbose debug logging you turned on "just for today" and never turned off.&lt;br&gt;
Log groups keep data forever by default.&lt;/p&gt;

&lt;p&gt;Quick fix: set a retention period on your log groups:&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
aws logs put-retention-policy --log-group-name "/aws/lambda/my-app" --retention-in-days 14&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Assuming "Free Tier" means "free"&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;AWS overhauled its Free Tier on July 15, 2025, and a lot of tutorials still describe the old model.&lt;/p&gt;

&lt;p&gt;If your account was created on or after July 15, 2025, you chose one of two plans at sign-up:&lt;/p&gt;

&lt;p&gt;Free plan: starts with $100 in credits (up to $100 more for completing onboarding activities). It's designed so you aren't charged. It ends after 6 months or when your credits run out, whichever comes first, and the account is closed unless you upgrade.&lt;br&gt;
Paid plan: same credits, but once they're used up, normal charges apply automatically.&lt;/p&gt;

&lt;p&gt;If your account was created before July 15, 2025, you're on the legacy Free Tier: 12-month trials with usage limits per service. Go over a limit, and you pay.&lt;/p&gt;

&lt;p&gt;Either way, "free" has conditions. Check which model applies to you before you trust a tutorial's "this costs nothing" claim.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Leaked access keys&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is the scary one.&lt;/p&gt;

&lt;p&gt;Security researchers have planted AWS access keys in public GitHub repos to see what happens. In those experiments, attackers found and started using the keys within 1 to 2 minutes. A common move is to launch the largest instances they can, often for cryptocurrency mining.&lt;/p&gt;

&lt;p&gt;These bills don't stop at tens of dollars.&lt;/p&gt;

&lt;p&gt;Quick checks:&lt;/p&gt;

&lt;p&gt;Search your repos (including old commits) for AKIA, the prefix of AWS access key IDs.&lt;br&gt;
In IAM, deactivate any access keys you don't actively use.&lt;br&gt;
Never create access keys for your root user, and turn on MFA for it.&lt;br&gt;
The root problem: no automatic spending cap&lt;/p&gt;

&lt;p&gt;All five causes share one thing. Unless you're on the new Free plan, AWS has no built-in spending cap that shuts everything down for you. It's not like a prepaid phone plan. If you don't notice, the charges keep coming.&lt;/p&gt;

&lt;p&gt;So the first priority is a system that tells you early:&lt;/p&gt;

&lt;p&gt;AWS Budgets: create a monthly cost budget with an email alert at 80% of an amount you're comfortable with. Budgets that only send notifications are free.&lt;br&gt;
Cost Anomaly Detection: it learns your normal spending and alerts you when something looks off, at no additional cost. It's on by default for accounts that enabled Cost Explorer after March 2023, but check that the alerts go to an inbox you actually read.&lt;/p&gt;

&lt;p&gt;One catch: budget data updates up to three times a day, typically 8 to 12 hours apart. An alert is a smoke detector, not a sprinkler. It tells you early; it doesn't put out the fire.&lt;/p&gt;

&lt;p&gt;Wrapping up&lt;/p&gt;

&lt;p&gt;Most surprise AWS bills aren't mysterious. They're idle resources, forgotten regions, chatty logs, Free Tier assumptions, or leaked keys. Spend 30 minutes setting up alerts and sweeping all regions, then 10 minutes a month reviewing your bill, and you'll catch almost all of it.&lt;/p&gt;

&lt;p&gt;If you'd like the whole thing as a step-by-step setup, I put together a short PDF guide: a 30-minute action plan, copy-paste CLI commands, and a 10-minute monthly checklist. It's $9 on Gumroad: Stop AWS Bill Shock. Everything in this article works without it, though.&lt;/p&gt;

&lt;p&gt;Sources (checked November 2026)&lt;/p&gt;

&lt;p&gt;Amazon VPC pricing (NAT Gateway, public IPv4)&lt;br&gt;
AWS News Blog: Public IPv4 address charge&lt;br&gt;
AWS Global Network FAQs (100 GB free data transfer out)&lt;br&gt;
Amazon CloudWatch pricing&lt;br&gt;
AWS News Blog: Free Tier update, July 2025&lt;br&gt;
AWS Budgets pricing&lt;br&gt;
AWS Budgets user guide (update frequency)&lt;br&gt;
Orca Security: 2023 Honeypotting in the Cloud Report&lt;br&gt;
Comparitech: AWS credentials on GitHub abused within 1 minute&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>cloud</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
