Refer to the exhibit. An IAM user with the 'Finance' tag is trying to upload an object to the 'production-data' bucket. The upload is failing. What is the most likely cause?
Exhibit
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::production-data/*",
"Condition": {
"StringNotEquals": {
"aws:PrincipalTag/Department": "Finance"
}
}
}
]
}Trap 1: The user is missing the required S3 permission in their IAM policy.
While missing permissions might be a cause, the exhibit shows a Deny policy. In AWS, an explicit Deny always overrides any Allow. Even if the user has full S3 permissions, this specific policy will block the action if the condition is met, making policy evaluation order the primary suspect.
Trap 2: The S3 bucket policy is not allowing the action.
The exhibit shows an IAM policy, not a bucket policy. While bucket policies can influence access, this specific IAM policy structure is designed to deny access based on principal attributes. The failure is explicitly caused by the logic within this Deny statement, which evaluates to true for non-Finance users.
Trap 3: The S3 bucket is in a different AWS region.
S3 bucket location does not affect IAM policy evaluation. IAM policies operate globally and act upon the resource ARN provided in the policy statement. The issue is clearly related to the ABAC logic defined in the condition block, rather than networking or regional constraints associated with the S3 bucket's underlying infrastructure.
- A
The user is missing the required S3 permission in their IAM policy.
Why it fails: While missing permissions might be a cause, the exhibit shows a Deny policy. In AWS, an explicit Deny always overrides any Allow. Even if the user has full S3 permissions, this specific policy will block the action if the condition is met, making policy evaluation order the primary suspect.
- B
The user does not have the 'Department' tag attached to their IAM principal.
The Condition uses StringNotEquals. If the tag is missing, the condition evaluates to true for the Deny, because 'null' is not equal to 'Finance'. Therefore, the Deny policy takes effect. ABAC implementations often fail when principals lack the necessary tags required by the policy logic, resulting in unexpected access denial.
- C
The S3 bucket policy is not allowing the action.
Why it fails: The exhibit shows an IAM policy, not a bucket policy. While bucket policies can influence access, this specific IAM policy structure is designed to deny access based on principal attributes. The failure is explicitly caused by the logic within this Deny statement, which evaluates to true for non-Finance users.
- D
The S3 bucket is in a different AWS region.
Why it fails: S3 bucket location does not affect IAM policy evaluation. IAM policies operate globally and act upon the resource ARN provided in the policy statement. The issue is clearly related to the ABAC logic defined in the condition block, rather than networking or regional constraints associated with the S3 bucket's underlying infrastructure.