Skip to content
IAM Policy Generator

IAM policy example: trust Identity Center roles, with a least privilege rewrite

Lets roles that IAM Identity Center creates for a permission set assume a role in the same account. The reserved role path aws-reserved/sso.amazonaws.com, matched with aws:PrincipalArn, picks those roles. The original trusts the whole account. The rewrite matches one permission set.

Open the workbench ยท All examples

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AccountRoot",
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::111122223333:root"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}

What it allows

  • Allows any principal in account 111122223333 whose own policy allows sts:AssumeRole to assume the role.

What it allows

  1. Allow AWS arn:aws:iam::111122223333:root to sts:AssumeRole.

    Action or patternActionsAccess levels
    sts:AssumeRole1Write 1

Checks

  • High Trusts arn:aws:iam::111122223333:root with no condition (for example sts:ExternalId for a third party, or aws:PrincipalOrgID): any principal the trusted account allows can assume this role. AWS documentation for this check

Any user, role or access key in the account can assume the role if its own policy permits sts:AssumeRole.

Least privilege rewrite

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "PermissionSetRoles",
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::111122223333:root"
      },
      "Action": "sts:AssumeRole",
      "Condition": {
        "ArnLike": {
          "aws:PrincipalArn": "arn:aws:iam::111122223333:role/aws-reserved/sso.amazonaws.com/AWSReservedSSO_PlatformAdmin_*"
        }
      }
    }
  ]
}

The rewrite adds a condition that matches the role Identity Center creates for the PlatformAdmin permission set. Other principals in the account cannot assume the role. Roles in a Region other than us-east-1 carry a Region segment in the path.

What it allows

  1. Allow AWS arn:aws:iam::111122223333:root to sts:AssumeRole when aws:PrincipalArn ArnLike arn:aws:iam::111122223333:role/aws-reserved/sso.amazonaws.com/AWSReservedSSO_PlatformAdmin_*.

    Action or patternActionsAccess levels
    sts:AssumeRole1Write 1

Checks

No flags from the six checks.

Sources

  1. IAM Identity Center User Guide: referencing permission sets, read 16 Nov 2026
  2. IAM User Guide: create a role to delegate permissions to an IAM user, read 16 Nov 2026
  3. AWS Service Authorization Reference, programmatic access (fetched 16 Nov 2026), read 16 Nov 2026

Last reviewed 16 Nov 2026.