Identity and Access Management
An administrator using an IAM user needs temporary credentials that retain the user's permissions and carry MFA authentication context for subsequent AWS API requests. Which AWS STS operation should the administrator use?
Show the answer
Correct answerB. GetSessionToken
AWhy not this: AssumeRole creates a role session rather than retaining the IAM user's permissions.
BWhy this is right: GetSessionToken supports MFA parameters and issues temporary credentials with the IAM user's permissions.
CWhy not this: GetFederationToken issues federated-user credentials but does not accept MFA authentication parameters.
DWhy not this: AssumeRoleWithSAML exchanges a SAML assertion for role credentials, not an MFA-authenticated IAM user session.
GetSessionToken with MFA parameters issues temporary credentials based on the IAM user's permissions and includes MFA authentication context. AssumeRole instead creates a role session governed by the role's permissions.