Q3Identity and Access Management
An AWS account administrator created an IAM group and applied the following managed policy to require that each individual user authenticate using multi-factor authentication: After implementing the policy, the administrator receives reports that users are unable to perform Amazon EC2 commands using the AWS CLI. What should the administrator do to resolve this problem while still enforcing multi-factor authentication?
← → navigate · a answer
Community votes
Discussion · 4
B 2
Selected Answer: B
https://docs.aws.amazon.com/STS/latest/APIReference/API_GetSessionToken.html
B 1
Selected Answer: B
The correct answer is B
aws sts get-session-token \
--serial-number arn:aws:iam::123456789012:mfa/username \
--token-code 123456
B 1
Selected Answer: B
MFA for CLI = temporary credentials (STS), not long-term access keys
B 1
Selected Answer: B
B because the sts get-session-token command creates temporary MFA-authenticated credentials, which lets AWS CLI requests satisfy the aws:MultiFactorAuthPresent condition.