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

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.

aws All AWS questions Roadmap: AWS core services

More on IAM Advanced, STS and Multi-Account