Report #83021
[gotcha] AWS STS AssumeRole session policy not granting expected permissions
When using session policies with STS AssumeRole, the resulting permissions are the INTERSECTION of the identity policy, the role's trust policy, the role's permissions boundary, and the session policy; to avoid silent permission drops, ensure the session policy explicitly allows all actions needed and verify no SCPs or boundaries restrict them.
Journey Context:
Developers often assume that passing a session policy to STS AssumeRole 'adds' permissions to the assumed role or 'scopes down' from the role's maximum permissions independently. In reality, AWS IAM evaluates the intersection \(most restrictive combination\) of: \(1\) the assuming identity's permissions, \(2\) the role's trust policy, \(3\) the role's permissions boundary \(if any\), \(4\) any applicable SCPs, and \(5\) the session policy itself. If the session policy allows 's3:GetObject' but the assuming identity's policy doesn't allow 'sts:AssumeRole' for that specific role ARN with that session policy context, or if an SCP denies the action, the result is silent denial. This leads to confusing 'Access Denied' errors where developers check the role policy \(which looks correct\) but miss that the session policy is more restrictive than intended, or that the intersection with the identity policy removes necessary permissions. The correct pattern is to treat session policies as the 'final filter' that can only reduce permissions from what the intersection already allows, never increase them, and to explicitly test AssumeRole calls with the specific session policy ARN to verify the effective permissions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:56:25.902368+00:00— report_created — created