Identity and Access Management

An IAM user's policies allow deletion but must deny it if MFA is absent or the source IP is outside an approved range. One Deny statement combines BoolIfExists aws:MultiFactorAuthPresent=false and NotIpAddress aws:SourceIp; how should it be corrected?

Show the answer

Correct answerD. Put each condition in a separate Deny statement covering deletion.

AWhy not this: Changing the Boolean operator does not change the AND relationship between the conditions.

BWhy not this: An additional Allow cannot fix the missing independent denial conditions.

CWhy not this: A permissions boundary uses the same condition-combination logic within a statement.

DWhy this is right: Each Deny applies independently, so either absent MFA or an unapproved source IP blocks deletion.

Different condition operators in one statement are combined with AND, so the existing Deny requires both conditions to match. Separate Deny statements enforce either violation independently; moving the combined conditions to a boundary preserves the flawed logic.