Onam
Identity

Why cloud IAM permissions go unused — and why that matters

By Poonam Yadav, Head of Engineering•May 28, 2026•Updated November 27, 2026•8 min read

Would rather we looked for you? We run a free one-time audit scan of one cloud account and go through the results with you. No charge, no commitment.

Free audit scan

Why do so many cloud IAM permissions never get used, and does it matter? They are granted to make something work and almost never removed when the need ends. It matters because an attacker who takes over an identity inherits every permission it holds, used or not. The fix is to measure granted against used, and remove the gap carefully, starting with identities that can reach admin.

Updated 27 November 2026: Onam's unused-access analysis now covers Google Cloud as well as AWS; one unsourced historical example was removed.

We are not going to put a percentage on how many permissions go unused, because a figure without a published sample behind it is marketing. What is consistent is the mechanism. Permissions are granted to make something work and almost never removed when the thing stops needing them. That is less a failure of individual teams than a consequence of how cloud IAM works in practice.

Illustrative IAM Security view, stylised, with demo data
Illustrative IAM Security view, stylised, with demo data

How permissions accumulate

Cloud IAM permissions grow in three ways, none of them malicious.

Copy-paste onboarding. When a new service account or role is needed quickly, engineers copy an existing role and modify it. The source role has permissions that were useful once, for a temporary migration, a debugging session or a feature that was later removed. Those permissions carry forward into every derivative role.

Managed policy breadth. AWS managed policies like AmazonS3FullAccess and AmazonEC2FullAccess cover entire service surfaces. A Lambda function that only reads from one S3 bucket gets full S3 permissions because attaching a managed policy is three clicks and writing a custom policy is forty minutes. The easy route is also the one that breaks least privilege.

Permission creep without cleanup. Role permissions accumulate as features get added. Nobody removes permissions when features are deprecated. A role that started with five specific permissions in 2022 has thirty by 2026, and the engineers who added the original five have moved to other teams.

Why unused permissions matter

An unused permission is a door that does not need to exist. From an attacker's perspective, the difference between a compromised Lambda execution role that can only read from one S3 bucket and one that has full S3 access is the difference between a minor incident and a data breach.

Consider the MITRE ATT&CK technique T1078.004 (Valid Cloud Accounts). When an attacker compromises a service account, whether through a misconfigured endpoint, a credential leaked in source code or a supply chain attack, they inherit exactly the permissions that account holds. If that account has permissions it never uses, the attacker has capabilities the account's legitimate owners never intended to grant.

Every permission that exists but is not needed is a pivot point that should not exist.

How CIEM measures the gap

CIEM (Cloud Infrastructure Entitlement Management) addresses this by computing the least-privilege gap: the difference between what an identity is permitted to do and what it does. Here is how Onam does it today.

1. Effective permission resolution. Attached policies alone do not tell you what a principal can do. Group membership adds permissions. Explicit denies elsewhere remove them. Conditions decide whether a grant applies at all, and Service Control Policies (SCPs) at the organisation level can block what an identity policy allows. Onam copies group policies onto members, classifies every condition by whether an attacker could satisfy it, nets out explicit denies and checks SCP deny statements. Permission boundaries and resource-based policies add further layers that Onam does not yet fold into the result. The docs list exactly what is and is not modelled.

How Onam resolves effective permissions on AWS: statements, groups, conditions, denies and SCPs
How Onam resolves effective permissions on AWS: statements, groups, conditions, denies and SCPs

2. Usage analysis from activity logs. CloudTrail records the API calls made in your AWS account. Onam reads the CloudTrail events its threat detection collects and builds a map of which actions each identity called. A granted action that has not appeared in the activity window is counted as unused, and the high-risk ones are listed separately. These include iam:PassRole, iam:CreatePolicyVersion, s3:PutBucketPolicy and kms:ScheduleKeyDeletion. The activity window is 30 days. Unused-access analysis runs on AWS and Google Cloud and needs cloud audit logs flowing into Onam; other clouds show granted access only.

You can see a first version of this gap on AWS without any tool: IAM's service last accessed data lists the services a role is allowed to use and when it last tried. Two read-only calls:

aws iam generate-service-last-accessed-details --arn arn:aws:iam::<account-id>:role/<role-name>
aws iam get-service-last-accessed-details --job-id <job-id-from-the-first-command>

AWS notes the data counts all access attempts, including denied ones, and considers identity-based permissions policies only (generate-service-last-accessed-details, accessed 27 November 2026).

3. A concrete change to review. The unused list, especially the high-risk unused actions, tells engineers exactly what to remove, and the used list is the starting point for a replacement policy. That is a change someone can review, rather than a vague "reduce permissions" ticket.

Where the gap is usually widest

Some identity types accumulate unused permissions faster than others:

  • Service accounts and workload roles (Lambda, ECS, EC2 instance profiles). Created for one feature, forgotten when the team moves on, and rarely reviewed because no human logs in as them.
  • Cross-account roles. Set up for a partner, a migration or a tool, then left in place long after the reason has gone.
  • Human users. Permissions follow people through team changes; few are removed when they move.
  • Federated identities. Broad SSO roles are convenient and hard to scope per person.

What to do about it

Do not aim for zero unused permissions straight away. That would mean rewriting every IAM policy in your account at once, which is not workable and will break things. Instead:

Start with the highest-risk identities. Shadow admins come first. These are identities that can reach admin-level access without holding an admin role. A service account that can assume a role that can assume another role with iam:* permissions is a three-hop privilege escalation path. CIEM surfaces these chains; fix them first.

Enforce for new identities. The easiest permission to remediate is one that was never granted. Add a review gate to your IAM policy creation process that requires justification for any permission a similar role has not needed. This does not fix existing debt, but it stops new debt from accumulating.

Automate the analysis and keep removal manual. Let tooling compute the gap continuously, but do not remove permissions automatically. Have a person check each change for operational correctness first. What looks unused over a few weeks may be used on a quarterly or annual cycle.

The cost of a false-positive access removal is a production incident. Measure automatically, remove carefully.

You will not fix over-provisioning in a sprint. It is a long-running hygiene practice, and good tooling lets you see and measure the progress.

Frequently asked questions

What is an unused cloud permission?

A permission an identity is granted but has not called during a recent activity window, measured from cloud audit logs such as CloudTrail.

Should unused permissions be removed automatically?

No. Measure automatically and remove carefully. Something unused for a few weeks may run quarterly or annually, and a wrong removal is a production incident.

Which clouds does Onam measure unused access on?

AWS and Google Cloud, over a 30-day window, with cloud audit logs flowing into Onam. Other clouds show granted access only.

Try it on your own cloud

Start free. The free plan covers up to 25 units of cloud security, with API-based scanning only: posture (CSPM), identity and permissions (CIEM), data stores found through cloud APIs (DSPM checks, no content classification) and AI-SPM. Posture scanning connects through read-only cloud roles, the free plan deploys no agent or scanner, and no card is needed. Register, and the team emails you the login.

Start free · Book a demo

See this on your own cloud, free

The free plan covers up to 25 units of cloud security with read-only cloud API scanning. It deploys no agent or scanner and needs no card. Register, and the team emails you the login.