<?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: Mario</title>
    <description>The latest articles on DEV Community by Mario (@mariogongora).</description>
    <link>https://dev.to/mariogongora</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3948275%2Fda58bf94-4e4e-473b-86a7-d8f11c5f0195.png</url>
      <title>DEV Community: Mario</title>
      <link>https://dev.to/mariogongora</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mariogongora"/>
    <language>en</language>
    <item>
      <title>IAM Misconfiguration: Why It Keeps Happening and How to Start Fixing It</title>
      <dc:creator>Mario</dc:creator>
      <pubDate>Sat, 23 May 2026 22:06:56 +0000</pubDate>
      <link>https://dev.to/mariogongora/the-iam-mistake-i-keep-finding-in-aws-environments-and-why-its-not-your-fault-16oo</link>
      <guid>https://dev.to/mariogongora/the-iam-mistake-i-keep-finding-in-aws-environments-and-why-its-not-your-fault-16oo</guid>
      <description>&lt;h2&gt;
  
  
  The Most Common Pattern I See
&lt;/h2&gt;

&lt;p&gt;Across the AWS environments I've reviewed — financial services, retail, healthcare, telecom — there is one pattern that shows up almost everywhere.&lt;/p&gt;

&lt;p&gt;It is not a sophisticated attack vector.&lt;br&gt;
It is not a zero-day vulnerability.&lt;br&gt;
It is IAM.&lt;/p&gt;

&lt;p&gt;Specifically, it is IAM configured the way it was configured three years ago, by someone who no longer works there, using a tutorial that was written for a single-account startup.&lt;/p&gt;

&lt;p&gt;The most frequent findings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;IAM Users with long-lived access keys attached to production workloads&lt;/li&gt;
&lt;li&gt;Admin roles without permission boundaries or conditions&lt;/li&gt;
&lt;li&gt;No SCPs enforced at the organization level — because there is no organization level&lt;/li&gt;
&lt;li&gt;Root account used regularly, sometimes for daily operations&lt;/li&gt;
&lt;li&gt;Access keys that have not been rotated in over 400 days&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of this is surprising.&lt;br&gt;
All of it is fixable.&lt;br&gt;
But first, you need to understand why it happens.&lt;/p&gt;


&lt;h2&gt;
  
  
  Why This Is Not a Skill Problem
&lt;/h2&gt;

&lt;p&gt;When I point out these findings to the teams responsible, the reaction is almost always the same.&lt;/p&gt;

&lt;p&gt;They know.&lt;/p&gt;

&lt;p&gt;They are not unaware that long-lived access keys are a risk. They have read the AWS documentation. They have seen the warnings in Security Hub. In some cases, they have even flagged it internally, written a ticket, added it to a backlog.&lt;/p&gt;

&lt;p&gt;The problem is not knowledge. The problem is context.&lt;/p&gt;

&lt;p&gt;AWS documentation, AWS Well-Architected Framework, AWS Security Best Practices — all of it was written assuming a certain baseline:&lt;/p&gt;

&lt;p&gt;A dedicated security team.&lt;br&gt;
A mature cloud governance process.&lt;br&gt;
An organization that started with multi-account in mind.&lt;br&gt;
Budget for tooling beyond what comes free with the account.&lt;/p&gt;

&lt;p&gt;For most organizations, the reality looks different.&lt;/p&gt;

&lt;p&gt;They entered AWS through a single team that needed to ship something fast. IAM was configured to make that happen. There was no time to design a permission model, no security architect on the team, and no organizational structure to enforce standards later.&lt;/p&gt;

&lt;p&gt;That is not negligence. That is how cloud adoption actually happens.&lt;/p&gt;


&lt;h2&gt;
  
  
  Where to Start Without Rewriting Everything
&lt;/h2&gt;

&lt;p&gt;The worst advice I can give someone in this situation is "start over."&lt;/p&gt;

&lt;p&gt;Tearing down IAM and rebuilding it properly sounds good in a blog post. In reality, it means production risk, migration work, and political capital you probably do not have.&lt;/p&gt;

&lt;p&gt;Here is what I actually recommend as a starting point — a sequence that reduces risk without requiring a full redesign:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Stop the bleeding.&lt;/strong&gt;&lt;br&gt;
Identify every IAM User with an access key that has not been rotated in 90+ days. Rotate or deactivate them. This takes a few hours and removes a real risk immediately.&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 generate-credential-report
aws iam get-credential-report &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="s1"&gt;'Content'&lt;/span&gt; &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;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="nt"&gt;-F&lt;/span&gt;&lt;span class="s1"&gt;','&lt;/span&gt; &lt;span class="s1"&gt;'NR&amp;gt;1 &amp;amp;&amp;amp; $9 != "N/A" { print $1, $9 }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2: Tag everything you touch.&lt;/strong&gt;&lt;br&gt;
Before changing any role or policy, add tags. This is how you build the visibility you need to understand what you have before you change it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Enable the basics in Security Hub.&lt;/strong&gt;&lt;br&gt;
Turn on AWS Foundational Security Best Practices standard. Let it run for a week. Do not try to fix everything — use the findings to build your backlog in priority order.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: No new IAM Users.&lt;/strong&gt;&lt;br&gt;
Draw a line. From today, every new workload that needs AWS access gets a role, not a user. Not because roles are perfect, but because the habit of using roles changes how your team thinks about identity.&lt;/p&gt;

&lt;p&gt;None of this requires a project. None of it requires approval from three stakeholders.&lt;br&gt;
It requires a decision to start.&lt;/p&gt;




&lt;h2&gt;
  
  
  What This Problem Is Actually Telling You
&lt;/h2&gt;

&lt;p&gt;IAM misconfiguration is not a technical problem with a technical solution.&lt;/p&gt;

&lt;p&gt;It is a signal.&lt;/p&gt;

&lt;p&gt;It tells you that cloud adoption happened faster than governance frameworks could follow. It tells you that security was positioned as a blocker rather than an enabler. It tells you that most teams building on AWS have been doing so without the baseline the documentation assumes they already have.&lt;/p&gt;

&lt;p&gt;That is the real gap — not skill, not intention. Baseline.&lt;/p&gt;

&lt;p&gt;The good news: you do not need a transformation program to close it.&lt;br&gt;
You need a decision, a starting point, and consistency over time.&lt;/p&gt;

&lt;p&gt;This article is part of that starting point.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;In the next article, I will go deeper into the governance layer that prevents these problems from appearing in the first place: AWS Service Control Policies, and how I use them to enforce security guardrails across environments in nine countries.&lt;/p&gt;

&lt;p&gt;If you are managing AWS accounts across multiple clients or countries, that one is for you.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;[Tags: AWS, IAM, Cloud Security, AWS Security, Cloud Governance, DevSecOps]&lt;/em&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>iam</category>
      <category>cloudsecurity</category>
      <category>cloudgovernance</category>
    </item>
  </channel>
</rss>
