What does MFA enforcement for the console look like in a shared account, and how do you require it for API calls too?
BeginnerScenarioIAM, Organizations and Multi-Account
Answer
Situation read → Console MFA is easy; API MFA is enforced via a policy condition.
What I'd do →
- Use SSO with MFA enforced in Identity Center settings
- For remaining IAM users attach a policy denying all except MFA-device management when
aws:MultiFactorAuthPresentis false - For API use, users call
aws sts get-session-token --serial-number arn:aws:iam::111111111111:mfa/alice --token-code 123456 - Prefer hardware or passkey MFA for admins
Why → The deny-unless-MFA pattern gives enforcement even when the user has valid keys.
Interview tip → Mention root user MFA and no root access keys as the first hygiene items.
More on IAM, Organizations and Multi-Account
A developer needs read-only access to one S3 bucket from their laptop. How do you grant it without creating long-lived access keys?BeginnerAn EC2 application needs to write to DynamoDB. Where do the credentials come from?BeginnerSecurity wants to know who deleted a production S3 bucket yesterday. How do you find out?BeginnerYou must stop anyone in a member account from disabling CloudTrail, even account admins. What do you use?BeginnerA cross-account role assumption fails with AccessDenied even though the target role trusts the source account. What do you check?IntermediateDesign access for a CI pipeline in GitHub Actions to deploy to AWS without storing AWS keys in GitHub.Intermediate