Interview Prep/AWS/IAM Advanced, STS and Multi-Account

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.

aws All AWS questions Roadmap: AWS core services

More on IAM Advanced, STS and Multi-Account