IAM least privilege without losing your mind
"Least privilege" is the goal. "Paralysis by permission analysis" is the failure mode. Here's how to get 80% of the benefit without consuming all your engineering time.
The three-tier model
Instead of per-role hyper-specificity, use three tiers:
Tier 1: Human roles (most scrutinized)
SSO-federated, MFA-required, narrowly scoped. Separate roles for:
- Read-only analyst
- Developer (read + write in dev, read-only in prod)
- Ops / SRE (production access with audit)
- Admin (full, break-glass only)
Tier 2: Service roles (medium scrutiny)
Per-service IAM roles assumed by EC2 / ECS / Lambda / Cloud Functions. Scoped to the service's actual needs. The default is "start with only the permissions the service needs to start" and add from there.
Tier 3: CI/CD roles (highest automation, lowest per-role specificity)
Pipeline roles that deploy infrastructure. These necessarily have broad permissions. Mitigate with: session duration limits, branch/env restrictions, required approvers.
The monthly review
First Monday of each month:
- Pull IAM Access Analyzer / Azure PIM / GCP IAM Recommender report.
- For the top 10 over-permissive roles, narrow.
- For roles dormant 90+ days, disable.
30 minutes. Every month. Compounds.
What to avoid
- Don't do weekly deep IAM reviews; the overhead outweighs the benefit.
- Don't grant
:permissions, even temporarily. It never gets walked back. - Don't assign permissions directly to users. Always through groups / roles.
- Don't use long-lived access keys. Use STS / session tokens.
Tools
- IAM Over-Permission Finder for the monthly pass.