Interview Prep/AWS/IAM Best Practices

How do you enforce MFA for sensitive API actions?

IntermediateProductionIAM Best Practices
Answer

With Identity Center, MFA happens at login and every session is MFA-backed, so the cleanest approach is enforcing MFA at the IdP. For roles assumed directly, use aws:MultiFactorAuthPresent in the trust policy, or deny sensitive actions when MFA is missing. Use BoolIfExists carefully: "BoolIfExists": {"aws:MultiFactorAuthPresent": "false"} in a deny also blocks long-term access keys, which never carry the key, so scope such denies to human principals.

aws All AWS questions Roadmap: AWS core services

More on IAM Best Practices