What is a session policy?
AdvancedConceptIAM Advanced, STS and Multi-Account
Answer
An inline policy (or up to 10 managed policy ARNs) passed as the Policy/PolicyArns parameter when calling AssumeRole, AssumeRoleWithWebIdentity, GetFederationToken and similar. It limits the resulting session to the intersection of the role's permissions and the session policy. It cannot expand permissions.
Use it to give a short-lived session to a tenant or job with scope narrower than the base role, for example restricting an S3 prefix per customer in a multi-tenant app.
More on IAM Advanced, STS and Multi-Account
Explain the IAM policy evaluation logic.AdvancedHow does cross-account access evaluation differ from same-account?AdvancedHow does `sts:AssumeRole` work, step by step?IntermediateWhat is the difference between AssumeRole, AssumeRoleWithWebIdentity and AssumeRoleWithSAML?IntermediateWhat is a permission boundary and when would you use one?IntermediateWhat do Service Control Policies do and not do?Intermediate