Sub topic 9
Single sign-on for people with IAM Identity Center
This chapter assumes you know IAM roles and trust policies, and you have read the previous chapter on cross-account roles. IAM Identity Center is the service that gives your workforce one sign-in for every account in the organization.
What it replaces
Without it, each person needs an IAM user in every account, or a hand-built role chain. Identity Center removes that work. People sign in once, and a portal lists the accounts and roles they may use. They receive short-lived credentials, not long-lived access keys.
The building blocks
| Concept | Meaning |
|---|---|
| Identity source | Where users and groups come from: the built-in directory, Active Directory, or an external identity provider (IdP) through SAML and SCIM |
| Permission set | A reusable template of IAM policies and a session duration |
| Assignment | A link between a user or group, a permission set and an account |
| Access portal | The sign-in page that lists each person's assigned accounts and roles |
When you assign a permission set to an account, Identity Center creates a role in that account. Its name starts with AWSReservedSSO_. The role trusts Identity Center, so it works like the cross-account roles you already know, with the sign-in step handled for you.
Setting it up
- Enable IAM Identity Center in the management account, with an organization instance. Choose the Region carefully, because it is hard to change later.
- Register a member account, such as a shared-services account, as the delegated administrator. Then the management account does not need daily use.
- Connect your identity source.
- Create permission sets such as
ReadOnlyandAdministratorAccess. - Assign groups to OUs' accounts with those permission sets.
Using it from the CLI
Run aws configure sso to create a profile. The result in ~/.aws/config looks like this:
[sso-session corp]
sso_start_url = https://d-example1234.awsapps.com/start
sso_region = eu-west-1
sso_registration_scopes = sso:account:access
[profile prod-app1-admin]
sso_session = corp
sso_account_id = 111122223333
sso_role_name = AdministratorAccess
region = eu-west-1aws sso login --profile prod-app1-admin
aws sts get-caller-identity --profile prod-app1-adminThe first command opens a browser for sign-in. The second shows an assumed role whose name starts with AWSReservedSSO_AdministratorAccess.
Common errors
- Assigning to users, not groups. Assignments multiply as people join and leave. Assign groups instead.
- Editing a permission set and seeing no change. After you change a permission set, Identity Center must reprovision it to the affected accounts. Check for accounts marked as out of date.
- Expired sessions. Credentials last for the permission set's session duration. Run
aws sso loginagain. - Mixing in IAM users. Keep a break-glass IAM role or user for outages of the identity source. Protect it and alert on its use.
Exercise
A new engineer is added to the "platform-admins" group, but cannot see the prod-app1 account in the access portal. The permission set and the group exist. What is the most likely missing step, and what should you check?
Show answer
The group has no assignment for the prod-app1 account. Create an assignment that links the group, the permission set and the account. Then confirm that the provisioning status shows the role was created in that account.