Sub topic 2
Attaching Policies to IAM Identity Center Permission Sets
Assume you know IAM roles, policies, and AWS Organizations. An assignment connects a principal, a permission set, and an AWS account. IAM Identity Center then provisions a role in that account.
Attaching policies
A permission set can contain several policy types:
- AWS managed policies are maintained by AWS, such as
ReadOnlyAccess. - Customer managed policies are maintained by you. The policy must exist in every target account.
- Inline policies are embedded directly in the permission set.
- A permissions boundary limits the maximum permissions that the resulting role can receive. It does not grant permissions by itself.
Use inline policies for small, permission-set-specific rules:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["ec2:StartInstances", "ec2:StopInstances"],
"Resource": "*"
}
]
}Session duration and relay state
The permission set controls how long a console session can last. Choose a duration that matches the task. Shorter sessions reduce exposure for privileged access.
A relay state is a destination URL used after sign-in, such as an account's console page or a service dashboard. It changes where the user lands, not what the permission set allows.
Assigning a group and permission set
Assignments are made per account. Select a group, permission set, and target account:
flowchart TD
G[Auditors group] --> A[Account assignment]
P[ReadOnlyAuditor permission set] --> A
C[AWS account] --> A
A --> R[Provisioned IAM role]Caption: An assignment combines a group, permission set, and account. Alt: A group and permission set connect to an account assignment, which creates a role.
Group-based assignments scale better than assigning individual users. For example, assign Auditors to ReadOnlyAuditor in every production account.
Provisioning and role creation
After an assignment, IAM Identity Center provisions an IAM role in the target account. Its name normally starts with AWSReservedSSO_. Users assume this role through the Identity Center portal or CLI.
When you change a permission set, re-provision it to push the new policies to existing roles. Inspect the target account's IAM roles and CloudTrail events when access does not match the design.
Customer managed policy consistency
A customer managed policy reference stores the policy name and path in the permission set. It does not copy the policy into accounts. Create the same policy, with the same path and compatible permissions, in every target account before provisioning.
Designing for growth
Use groups for job functions, and permission sets for access levels. Keep names stable and avoid one permission set per person. Separate read-only, operator, and administrator access. Combine account assignments with Organizations data, but remember that assignments still target individual accounts.
Exercise
Why can a customer managed policy reference fail in one account but work in another?
Show answer
The referenced policy may be missing, have a different path or name, or lack compatible permissions in that account.