Sub topic 1
How IAM Identity Center fits into a multi-account setup
Prerequisites
This chapter assumes you know:
- Basic IAM concepts: users, roles, policies, and the policy JSON structure.
- AWS Organizations basics: management account, member accounts, and organizational units (OUs).
- How to run AWS CLI commands.
- What single sign-on (SSO) and an identity provider (IdP) are.
The problem it solves
In a multi-account setup, each account has its own IAM. Without a central service, you would create IAM users or roles by hand in every account. People would then keep separate credentials for each one. Offboarding someone means visiting every account, and it is easy to miss one.
IAM Identity Center is the AWS service that centralizes workforce access to many accounts. People sign in once. They then pick an account and a role from a portal, or request credentials through the AWS CLI. Those credentials are temporary.
The working model
Three pieces combine to give someone access:
- A principal is a user or group from your identity source.
- A permission set is a template that holds policies and session settings.
- An account is the target where access is granted.
Tying one principal, one permission set, and one account together creates an account assignment. Identity Center then creates an IAM role in that account, based on the permission set. This is called provisioning. The user assumes that role when they sign in.
The organization instance
Identity Center runs as an instance. The common choice is the organization instance, which you enable from the management account of an AWS Organization. It manages access across the member accounts. You can check the instance from the CLI:
aws sso-admin list-instances \
--query 'Instances[0].[InstanceArn,IdentityStoreId]' \
--output textThe output gives two values you will reuse in later chapters. The instance ARN identifies the instance in sso-admin calls. The identity store ID identifies the directory of users and groups.
A few facts to keep in mind:
- An Organization has one organization instance, and it lives in one AWS Region. Choose that Region deliberately, because you cannot casually move it later.
- Permission sets and assignments are defined in the instance, not in each member account.
- The roles that Identity Center creates in member accounts are managed by the service. Do not edit them by hand, because the next provisioning run overwrites your changes.
Common errors
- Empty list from
list-instances. You are probably in the wrong Region, or the instance is not enabled. Set--regionto the instance Region. - Access denied when managing Identity Center. By default, only the management account can administer it. Later chapters cover delegating this to another account.
- Expecting permission sets to exist in each account. A permission set is a template. It becomes a role only after you assign it.
Exercise
A permission set named ReadOnlyAuditor exists, but no assignments use it. Does any account contain a role for it? Why?
Show answer
No. A permission set is only a template in the Identity Center instance. Identity Center creates a role in a member account only when a principal and the permission set are assigned to that account.