Sub topic 3
Assigning IAM Identity Center Access Across Accounts
Assume you know IAM policies, AWS Organizations, the AWS CLI, and basic single sign-on. An account assignment combines a principal, such as a group, a permission set, and one AWS account. Assignments target accounts, not organizational units (OUs), so an OU-wide design must enumerate its active accounts.
Assigning across accounts and OUs
List the accounts under an OU, filter for ACTIVE, and create one assignment per account. Groups scale better than individual users because membership changes do not require changing every assignment. Reusable permission sets should represent job functions, such as ReadOnlyAuditor or Developer.
Delegating administration
A management-account administrator can register a delegated administrator for IAM Identity Center. This lets an approved member account manage Identity Center resources while the management account retains organization-wide authority. Limit delegated administrators and protect their administrative roles with MFA and least privilege.
Automating the setup
The CLI is useful for repeatable scripts. CloudFormation is better when assignments and permission sets belong to a reviewed deployment.
aws sso-admin create-account-assignment \
--instance-arn "$INSTANCE_ARN" \
--target-id "$ACCOUNT_ID" \
--target-type AWS_ACCOUNT \
--permission-set-arn "$PS_ARN" \
--principal-type GROUP \
--principal-id "$GROUP_ID"A CloudFormation permission set can declare its policy:
Resources:
ReadOnlyAuditor:
Type: AWS::SSO::PermissionSet
Properties:
InstanceArn: !Ref InstanceArn
Name: ReadOnlyAuditor
SessionDuration: PT4H
ManagedPolicies:
- arn:aws:iam::aws:policy/ReadOnlyAccessAttribute-based access control
Attribute-based access control (ABAC) uses session attributes instead of many separate policies. For example, an inline policy can allow actions only when an EC2 instance's Department tag equals the user's Department session tag. Configure trusted attributes in Identity Center, then test missing or incorrectly mapped attributes because they can cause an unexpected denial.
Command-line access
After assignment, configure an IAM Identity Center profile and run:
aws sso login --profile audit-prod
aws sts get-caller-identity --profile audit-prodThe profile obtains temporary credentials for the provisioned role.
Auditing and troubleshooting
Use CloudTrail to inspect Identity Center API events, assignment changes, and provisioning failures. In each target account, inspect the AWSReservedSSO_ role and its attached policies. If access is missing, check the group identifier, account status, permission-set policies, provisioning status, and whether a changed permission set was reprovisioned.
Exercise
Why must a script create separate assignments for accounts in one OU?
Show answer
IAM Identity Center account assignments target individual accounts, not OUs.