What is the difference between AssumeRole, AssumeRoleWithWebIdentity and AssumeRoleWithSAML?
IntermediateConceptIAM Advanced, STS and Multi-Account
Answer
AssumeRole is called by an already-authenticated AWS principal. AssumeRoleWithWebIdentity exchanges an OIDC token (Cognito, Google, GitHub Actions, EKS service-account token) for credentials, with no AWS credentials needed to make the call. AssumeRoleWithSAML exchanges a SAML assertion from an enterprise IdP.
The latter two are unsigned calls, so the trust policy must carefully constrain claims (sub, aud) to prevent any token from the IdP assuming the role.
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 a permission boundary and when would you use one?IntermediateWhat do Service Control Policies do and not do?IntermediateDeny-list vs allow-list SCP strategy: which do you pick?Advanced