Identity and Access Management

A workload receives OIDC tokens from an external identity provider and needs temporary AWS credentials without stored AWS access keys. Which AWS STS operation should it use?

Show the answer

Correct answerB. AssumeRoleWithWebIdentity

AWhy not this: AssumeRoleWithSAML accepts SAML assertions, not OIDC tokens.

BWhy this is right: AssumeRoleWithWebIdentity accepts an OIDC token and returns temporary credentials for a trusted role.

CWhy not this: GetSessionToken requires an existing IAM user's AWS credentials rather than an OIDC token.

DWhy not this: GetFederationToken requires an AWS-credential-signed request rather than accepting an OIDC token.

AssumeRoleWithWebIdentity exchanges a supported OIDC token for temporary role credentials. AssumeRoleWithSAML requires a SAML assertion rather than an OIDC token.