How to Audit Cloud IAM Permissions Before Migration
Audit cloud IAM permissions before migration with a repeatable process: inventory, measure actual use, right-size access, and add guardrails
To audit cloud IAM permissions before migration, build a full inventory of every identity and what it can do, compare granted permissions against what each identity actually uses, remove the excess, and record the result before anything moves. The audit is not a paperwork exercise.
Permissions granted in the old environment travel with the workload, and an over-privileged account that was harmless on a private network becomes a real risk once it sits in the cloud.
Most teams are surprised by what the audit finds. Service accounts created for a one-off project still hold admin rights years later. Former staff still appear in groups. A deployment role can delete production databases even though it only ever deploys code.
None of this is unusual — permissions grow quietly, one urgent fix at a time, until nobody can say who can do what.
This guide gives you a repeatable audit process that works across the major cloud providers: inventory, classify, measure actual use, right-size, add guardrails, and document. Do it before migration, when you can still fix things without a production incident hanging over you.

Key Takeaways
- Inventory every human and workload identity before migration — including service accounts and deployment roles.
- Compare granted permissions with actual use over the last 90 days; the gap is your risk.
- Remove wildcard and admin permissions that no workload actually needs.
- Separate human access from workload access and review each group on its own terms.
- Record every decision and repeat the audit on a schedule, not just once.
What Is a Cloud IAM Audit, Really?
An IAM audit answers five questions: who and what can access each account or project, which permissions are actually needed for the documented job, which identities are unused or duplicated, whether unusual access would be noticed, and whether there is evidence that reviews and removals happen.
If you can answer all five with records to back them up, the audit is done.
The work splits into two very different groups. Human identities are people: staff, contractors, and admins, usually signing in through a central identity provider. Workload identities are the non-human ones: service accounts, deployment roles, application roles, and automation. They behave differently, fail differently, and need different review questions, so audit them separately.
Provider terminology differs, but the concepts map cleanly. AWS uses IAM users, roles, and policies. Azure uses Microsoft Entra identities, groups, and role assignments. Google Cloud uses principals, service accounts, and IAM bindings. Learn the terms for your provider, but keep the same review fields for every identity so the results compare fairly.
How Do You Build the Identity Inventory?
Start by exporting everything. On AWS, the account authorization details export lists users, groups, roles, and attached policies in one file. On Azure, list role assignments across subscriptions. On Google Cloud, pull the IAM policy at the organization, folder, and project levels.
Do not rely on the console alone — exports give you a list you can sort, filter, and keep as evidence.
For each human identity, record the person, their team, their employment status, their identity provider, group memberships, assigned roles, privileged access, last sign-in date, and authentication method. Flag anyone who has not signed in for months, anyone with direct permissions outside their groups, and anyone whose manager or system owner is unknown.
For each workload identity, record the application, the environment, the owning team, the attached policies, the resources it touches, and the deployment system that uses it. The owning team matters most: a service account with no owner is a permission nobody will ever remove, because nobody feels responsible for it.
If an identity has no owner, assign one before the audit continues.
How Do You Measure What Permissions Are Actually Used?
Granted permissions are a promise; used permissions are the truth. The gap between them is the risk you are auditing.
All three major providers offer tools that show actual use: AWS Access Analyzer can generate a least-privilege policy from recent CloudTrail activity, Google Cloud’s IAM Recommender surfaces right-sizing suggestions based on recent activity, and Azure offers access reviews and sign-in logs for the same purpose.
Look at a window of at least 90 days. A shorter window misses monthly jobs, quarterly reports, and the batch process that runs twice a year. For each identity, list the permissions it used and compare them with the permissions it holds.
In many environments the average identity uses only a small fraction of what it was granted, and the unused remainder is pure attack surface.
Pay special attention to the dangerous permissions: anything that can create or delete resources, change IAM policies, read secrets, or access production data. An unused delete permission on a deployment role is not harmless — it is a loaded tool sitting on a shelf.
If a workload has not used a permission in 90 days, the default decision should be to remove it, not to keep it just in case.
How Do You Right-Size Permissions Without Breaking Things?
Right-sizing means replacing broad permissions with narrow ones that match actual use. Replace wildcard actions with the specific actions the workload calls. Replace resource wildcards with the specific buckets, databases, or queues involved.
Add conditions where they make sense, such as limiting a role to a particular region or to requests that carry a specific tag.
Do this in stages, starting with the lowest-risk identities. Tighten a staging or development role first, watch it for a week, and confirm nothing breaks before touching production roles. For each change, keep the old policy saved somewhere safe so you can restore it quickly if a job fails at 2 a.m.
The goal is steady progress, not a single heroic cleanup that breaks a deployment pipeline.
Watch out for the patterns that cause the most trouble. Direct permissions attached to individual users instead of groups make reviews nearly impossible. Long-lived access keys sitting in code or on developer machines are a standing risk; replace them with short-lived credentials or managed identities wherever the provider supports it.
And privileged access that never expires should be replaced with just-in-time elevation, where an admin requests higher access for a limited time and the request is logged.
What Guardrails Stop Permissions From Growing Back?
An audit without guardrails is a snapshot that goes stale within weeks. The fix is to put checks in the path where permissions change. Validate policies in your deployment pipeline before they merge, so a wildcard or a dangerous permission fails the build instead of reaching production.
AWS Access Analyzer policy validation does exactly this, and the other providers have equivalent checks.
Set up access reviews on a schedule. Privileged roles should be reviewed at least quarterly, and every identity should be reviewed when someone changes teams or leaves. Make the review default to removal: if nobody confirms an identity still needs its access, the access goes away. Reviews that default to keeping everything change nothing.
Also set up detection. Alert on new admin grants, on policy changes outside the normal pipeline, and on sign-ins from unusual locations or at unusual hours. The audit tells you what access exists today; monitoring tells you when it changes tomorrow. Both are needed, and neither replaces the other.
Pre-Migration IAM Audit Checklist
Work through this checklist in order, and keep the completed version as your audit record.
- Export the full identity inventory: humans, service accounts, roles, groups, and policies.
- Assign an owner to every identity; flag any identity with no owner or no recent use.
- Review human access: leavers removed, role changes applied, admin accounts separated.
- Review workload access: one role per job, no shared super-roles across applications.
- Compare granted versus used permissions over at least 90 days for every identity.
- Remove unused permissions; replace wildcards with specific actions and resources.
- Replace long-lived keys with short-lived credentials or managed identities.
- Turn on multi-factor authentication for every human account, including admins.
- Add policy validation to the deployment pipeline and schedule quarterly access reviews.
- Document every finding, decision, and exception, with a named owner and a review date.
How Do the Three Providers Compare for IAM Audits?
The audit process is the same everywhere, but the tooling has different names. Use this comparison to find the right tool on your provider.
| Audit step | AWS | Azure | Google Cloud |
|---|---|---|---|
| Export identity inventory | Account authorization details export | Role assignment list | IAM policy export |
| Find unused access | Access Analyzer, last-accessed data | Access reviews, sign-in logs | IAM Recommender |
| Generate least-privilege policy | Access Analyzer policy generation | Entra recommendations | Recommender suggestions |
| Validate policies in pipeline | Access Analyzer validate-policy | Policy and review checks | Policy Analyzer |
| Emergency access | Break-glass role, monitored | Emergency access accounts | Break-glass account, monitored |
Frequently Asked Questions
When should we audit IAM permissions?
Before any migration, and then at least quarterly afterward. Migration is the best moment because permissions are already under review, the team is expecting change, and fixes made now do not have to be retrofitted under pressure later.
How long should the usage window be?
At least 90 days. Shorter windows miss monthly and quarterly jobs, which leads to removing a permission that a batch process genuinely needs. If your environment has annual jobs, note them separately and protect them with documentation rather than permanent broad access.
What is the most common finding in an IAM audit?
Over-privileged service accounts and deployment roles. A role created to deploy code often ends up able to delete databases or change network settings, simply because a broad policy was the fastest fix during an incident. These are also the identities least likely to have an owner.
Should we delete unused identities or just remove their permissions?
Delete the identity if nothing uses it and nobody owns it. An unused identity with no permissions is still a doorway that could be granted access later by mistake. Keep a record of what was deleted, so a team can ask for it back with a proper justification if it turns out to be needed.
How do we handle emergency or break-glass access?
Keep it, but make it loud. Break-glass accounts should require strong authentication, be used rarely, and trigger an alert every time they sign in. Review their use after every incident and confirm the access is still needed.
Can we automate the IAM audit?
Yes, and you should. Exports, usage analysis, and policy validation can all run on a schedule. What cannot be automated is the judgement: whether a permission is genuinely needed, who owns an identity, and whether an exception is justified. Automation collects the evidence; people make the decisions.
What if tightening permissions breaks a production job?
That is why changes go in stages, starting with non-production roles, with the old policy saved for a quick restore. If a job fails, restore the previous policy, find out which permission it actually needed, and grant exactly that one. A breakage caught this way is a finding, not a failure.
Conclusion
A cloud IAM audit before migration is one of the highest-value hours a team can spend. Inventory every identity, measure what each one actually uses, remove the excess, and put guardrails in place so permissions do not grow back.
The migration then carries a clean access model into the cloud instead of a decade of accumulated shortcuts. Start with the lowest-risk roles, document every decision, and repeat the audit every quarter. For the wider migration picture, see our guide on what to check before moving to the cloud.