Question 151 · 475 in bank
A company has mandated the use of multi-factor authentication (MFA) for all IAM users, and requires users to make all API calls using the CLI. However, users are not prompted to enter MFA tokens, and are able to run CLI commands without MFA. In an attempt to enforce MFA, the company attached an IAM policy to all users that denies API calls that have not been authenticated with MFA. What additional step must be taken to ensure that API calls are authenticated using MFA?
Show answer
Answer: D
Explanation
D. Require users to use temporary credentials from the get-session token command to sign API calls. In order to enforce MFA for API calls using the CLI, the company needs to require users to use temporary credentials obtained from the get-session-token command. This command will prompt the user to enter their MFA token, and will return temporary security credentials that include an MFA token. The user can then use these temporary credentials to sign API calls, which will ensure that the calls are authenticated using MFA. The temporary credentials will automatically expire after a set duration, ensuring that access is limited and secure.
Source: Adapted from community discussion — awsguru1998