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

Facts read 16 Nov 2026. Page reviewed 16 Nov 2026.

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.

```json
{
  "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.

- Allows AWS arn:aws:iam::111122223333:root to sts:AssumeRole.

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. (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_third-party.html)

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

## Least privilege rewrite

```json
{
  "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.

- Allows 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_*.

Checks:
- No flags.

- [Paste it into the workbench](/)
- [Every STS action and its access level](/actions/sts/)

## Related pages

- [IAM policy example: S3 bucket policy for TLS and org](/examples/s3-bucket-policy-enforce-tls-and-organization/)
- [IAM policy example: write a KMS key policy](/examples/kms-key-policy-account-admin-and-key-user/)
- [IAM policy example: let an SNS topic send to an SQS queue](/examples/sqs-queue-policy-allow-sns-topic/)
- [All of them](/examples/)

## Sources

- IAM Identity Center User Guide: referencing permission sets: https://docs.aws.amazon.com/singlesignon/latest/userguide/referencingpermissionsets.html (read 16 Nov 2026)
- IAM User Guide: create a role to delegate permissions to an IAM user: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user.html (read 16 Nov 2026)
- AWS Service Authorization Reference, programmatic access (fetched 16 Nov 2026): https://docs.aws.amazon.com/service-authorization/latest/reference/service-reference.html (read 16 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://iampolicygenerator.com/examples/trust-policy-identity-center-permission-set-role/

This site is not affiliated with Amazon Web Services. AWS service and product names are used only to describe AWS services.
