A developer must use MFA to access data in an S3 bucket located in a different AWS account. Which AWS STS API operation should be called with the MFA information to meet this requirement?
Choose an answer
Tap an option to check your answer.
Correct answer: AssumeRole.
Why this is the answer
The AssumeRole API operation is the correct choice because it allows a trusted entity (like an IAM user or another AWS account) to assume an IAM role, and it supports passing MFA information. When assuming a role in a different account, this operation enables the necessary cross-account access while enforcing the MFA requirement. AssumeRoleWithWebIdentity is used for federating identities from OpenID Connect (OIDC) providers like Google, Facebook, or Amazon Cognito, not for direct MFA-protected cross-account access. GetFederationToken is used to obtain temporary credentials for federated users within the same account, but it doesn't support assuming roles in other accounts or directly enforcing MFA for cross-account access. AssumeRoleWithSAML is used for federating identities from SAML 2.0-compliant identity providers, not for direct MFA-protected cross-account access.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed