Sub topic 17
Auditing changes and troubleshooting access
This chapter assumes you can read CloudTrail events and know the IAM role and trust policy basics. It also assumes you have already created permission sets and assignments. Here you learn where to find a record of what changed, and how to work out why a user cannot reach an account or an action.
Where the audit trail lives
IAM Identity Center writes its administrative API calls to CloudTrail in the Region of your Identity Center instance. The events appear in the management account, or in the delegated administrator account if you use one. The event source is sso.amazonaws.com.
The events that matter most for permission sets are:
CreateAccountAssignmentandDeleteAccountAssignmentAttachManagedPolicyToPermissionSetandPutInlinePolicyToPermissionSetUpdatePermissionSetProvisionPermissionSet
Each event records who made the call, the permission set ARN, the target account, and the principal. The following command lists recent changes:
aws cloudtrail lookup-events \
--region us-east-1 \
--lookup-attributes AttributeKey=EventSource,AttributeValue=sso.amazonaws.com \
--max-results 50 \
--query 'Events[].{Time:EventTime,Name:EventName,User:Username}' \
--output tablelookup-events covers only the last 90 days of management events. For longer retention, query a CloudTrail trail or CloudTrail Lake instead.
In a member account, a sign-in appears as an AssumeRoleWithSAML event. The role name starts with AWSReservedSSO_. Use this event to see who actually used a permission set.
Inspect what is provisioned
Compare what Identity Center believes with what exists in the account:
aws sso-admin list-permission-sets-provisioned-to-account \
--instance-arn "$INSTANCE_ARN" --account-id 111122223333
aws sso-admin list-account-assignments \
--instance-arn "$INSTANCE_ARN" --account-id 111122223333 \
--permission-set-arn "$PS_ARN"Then check the role itself from inside the target account:
aws iam list-roles --path-prefix /aws-reserved/sso.amazonaws.com/ \
--query 'Roles[].RoleName'A role with the name AWSReservedSSO_<PermissionSetName>_<hash> should exist for each provisioned permission set. Do not edit these roles by hand, because Identity Center overwrites them on the next provision.
A troubleshooting path
Common causes, in the order to check them:
| Symptom | Likely cause | Fix |
|---|---|---|
| Account missing from the portal | User is not in the assigned group, or the assignment failed | Verify membership, then run `list-account-assignments` |
| Role missing in the account | Provisioning failed or never ran | Check `describe-permission-set-provisioning-status`, then run `provision-permission-set` |
| Provisioning fails | A customer managed policy is missing in the target account | Create a policy with the same name and path in that account |
| `AccessDenied` on an allowed action | An SCP, permissions boundary, or missing session tag | Review each layer; an explicit deny always wins |
| Credentials stop working | Session duration reached | Sign in again, or raise the duration and re-provision |
Exercise
A user is in the Auditors group and the assignment exists, but a new inline policy you added to the permission set has no effect in the account. What do you check and run?
Show answer
Changes to an already provisioned permission set are not pushed automatically. Check the provisioning status, then run aws sso-admin provision-permission-set --target-type ALL_PROVISIONED_ACCOUNTS. Afterward, inspect the AWSReservedSSO_ role in the account to confirm the policy is present. In CloudTrail, look for a ProvisionPermissionSet event after your PutInlinePolicyToPermissionSet event.