A security engineer must update an IAM policy to require multi-factor authentication (MFA) for IAM users accessing certain production services. Each authenticated session must be valid for no longer than 2 hours. Which conditions should be added to the policy to meet these requirements? (Choose two.)
Choose an answer
Tap an option to check your answer.
Correct answer: "Bool": {"aws:MultiFactorAuthPresent": "true"}, "NumericLessThan": {"aws:MultiFactorAuthAge": "7200"}.
Why this is the answer
The condition "Bool": {"aws:MultiFactorAuthPresent": "true"} correctly enforces MFA, as true requires the user to have authenticated with MFA. The condition "Bool": {"aws:MultiFactorAuthPresent": "false"} would explicitly deny access if MFA was used, which is incorrect. The condition "NumericLessThan": {"aws:MultiFactorAuthAge": "7200"} correctly limits the session duration to 2 hours (7200 seconds). aws:MultiFactorAuthAge represents the time in seconds since the MFA device was used. By setting NumericLessThan to 7200, the policy ensures that any session older than 2 hours (7200 seconds) will be denied access, effectively requiring re-authentication with MFA. "NumericGreaterThan": {"aws:MultiFactorAuthAge": "7200"} would allow sessions older than 2 hours, which is the opposite of the requirement. "NumericLessThan": {"MaxSessionDuration": "7200"} is not a valid condition key for this purpose; MaxSessionDuration is a setting on an IAM role, not a condition key for user sessions.
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