<?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: jonnym</title>
    <description>The latest articles on DEV Community by jonnym (@jonmelia).</description>
    <link>https://dev.to/jonmelia</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%2F4228100%2F30452a1f-39d8-46da-a100-3f3a48ad6af1.jpg</url>
      <title>DEV Community: jonnym</title>
      <link>https://dev.to/jonmelia</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jonmelia"/>
    <language>en</language>
    <item>
      <title>Find unused AWS resources, and work out who made them</title>
      <dc:creator>jonnym</dc:creator>
      <pubDate>Thu, 05 Nov 2026 09:01:48 +0000</pubDate>
      <link>https://dev.to/jonmelia/find-unused-aws-resources-and-work-out-who-made-them-39em</link>
      <guid>https://dev.to/jonmelia/find-unused-aws-resources-and-work-out-who-made-them-39em</guid>
      <description>&lt;p&gt;Most AWS accounts are paying for things nobody uses any more. Each one is small, so nobody chases it. Finding them is the easy half. The hard half is knowing whether they're safe to delete.&lt;/p&gt;

&lt;h2&gt;
  
  
  Find them in every region
&lt;/h2&gt;

&lt;p&gt;The console shows one region at a time, and the forgotten things tend to be in the region nobody looks at. This lists unattached volumes in every enabled region:&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;region &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="s1"&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;$region&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
  aws ec2 describe-volumes &lt;span class="nt"&gt;--region&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$region&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;--filters&lt;/span&gt; &lt;span class="nv"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;status,Values&lt;span class="o"&gt;=&lt;/span&gt;available &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="s1"&gt;'Volumes[].[VolumeId,Size,CreateTime]'&lt;/span&gt; &lt;span class="nt"&gt;--output&lt;/span&gt; table
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same pattern works for Elastic IPs that aren't attached to anything:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws ec2 describe-addresses &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="s1"&gt;'Addresses[?AssociationId==null].[PublicIp,AllocationId]'&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;And for log groups that never expire:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws logs describe-log-groups &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="s1"&gt;'logGroups[?!retentionInDays].[logGroupName,storedBytes]'&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;Cost Explorer, Trusted Advisor and Compute Optimizer will also point you at likely waste. What they won't tell you is who made something, or whether it's still needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Find out who made it
&lt;/h2&gt;

&lt;p&gt;Deleting something because it looks unused is how outages happen. Start with tags, if you have them. If you don't, CloudTrail's event history keeps 90 days of management events in each 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;--lookup-attributes&lt;/span&gt; &lt;span class="nv"&gt;AttributeKey&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ResourceName,AttributeValue&lt;span class="o"&gt;=&lt;/span&gt;vol-0123456789abcdef0 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="s1"&gt;'Events[].[EventName,Username,EventTime]'&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;If the resource is in Terraform or CloudFormation, delete it there, not by hand, or it'll come back on the next apply.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ask, then act
&lt;/h2&gt;

&lt;p&gt;Send the owner a short list: what it is, what it costs a month, and a choice to fix it, keep it, or snooze it. Write the answer down, so next month nobody has to ask about the same volume again.&lt;/p&gt;

&lt;p&gt;The full guide, with more places waste hides, is at &lt;a href="https://getstrays.com/guides/find-unused-aws-resources" rel="noopener noreferrer"&gt;getstrays.com/guides/find-unused-aws-resources&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Disclosure: I built Strays, a read-only tool that does this every week and asks the owners in Slack or Teams.&lt;/p&gt;

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