Sub topic 9
Provisioning: the roles that appear in each account
This chapter assumes you know IAM roles and trust policies, and that you have already created a permission set and an account assignment. Here you will see what Identity Center creates in each member account, when it creates it, and how to keep it current.
Assignments create roles
A permission set is a template that lives in Identity Center. It does nothing in a member account until you assign it there. The first assignment of a permission set to an account triggers provisioning, and Identity Center creates an IAM role in that account.
The role has these properties:
- Name:
AWSReservedSSO_<PermissionSetName>_<hash>. The hash differs for each account. - Path: it starts with
/aws-reserved/sso.amazonaws.com/. - Policies: the permission set's managed, inline, and customer managed policies, plus any permissions boundary.
- Trust policy: it trusts a SAML provider named
AWSSSO_<hash>_DO_NOT_DELETE, which Identity Center also creates in the account.
There is one role per permission set per account. Ten groups assigned the same permission set in one account share one role. Removing the last assignment of a permission set from an account deletes that role.
Inspecting the role
Run this with credentials for the member account:
aws iam list-roles \
--path-prefix /aws-reserved/sso.amazonaws.com/ \
--query 'Roles[].RoleName' --output textTreat these roles as read-only. Identity Center overwrites manual edits the next time it provisions. If you rename, delete, or edit the role or the SAML provider, sign-in can fail.
Out-of-sync accounts
Creating an assignment provisions the role immediately. Editing a permission set that is already assigned does not update the roles. The console shows the affected accounts as needing re-provisioning, and you push the change yourself:
aws sso-admin provision-permission-set \
--instance-arn "$INSTANCE_ARN" \
--permission-set-arn "$PS_ARN" \
--target-type ALL_PROVISIONED_ACCOUNTSThe call returns a request ID. Use it to check progress:
aws sso-admin describe-permission-set-provisioning-status \
--instance-arn "$INSTANCE_ARN" \
--provisioning-request-id "$REQUEST_ID"To find accounts that still have an old version of the permission set, list them by status:
aws sso-admin list-accounts-for-provisioned-permission-set \
--instance-arn "$INSTANCE_ARN" \
--permission-set-arn "$PS_ARN" \
--provisioning-status LATEST_PERMISSION_SET_NOT_PROVISIONEDCommon errors
| Symptom | Likely cause |
|---|---|
| Policy change has no effect | The permission set was edited but not re-provisioned. |
| Provisioning fails with a policy error | A customer managed policy with the referenced name and path does not exist in the target account. |
| Role missing in an account | No assignment exists for that account, or the last one was removed. |
| Sign-in fails after cleanup | Someone deleted the role or the `DO_NOT_DELETE` SAML provider. |
Exercise
You added an inline policy statement to a permission set that is assigned to 40 accounts. Users say the new permission is missing. What do you run, and how do you confirm the result?
Show answer
Run aws sso-admin provision-permission-set with --target-type ALL_PROVISIONED_ACCOUNTS, because editing a permission set does not update existing roles. Then check the request with describe-permission-set-provisioning-status. You can also list accounts with list-accounts-for-provisioned-permission-set --provisioning-status LATEST_PERMISSION_SET_NOT_PROVISIONED and expect no results.