nerdexam
Amazon

SCS-C02 · Question #197

A company wants to deny a specific federated user named Bob access to an Amazon S3 bucket named DOC-EXAMPLE-BUCKET. The company wants to meet this requirement by using a bucket policy. The company…

The correct answer is B. { "Version": "2012-10-17", "Statement": [ { "Principal": { "AWS": "arn:aws:sts::account-id:federated-user/Bob" }, "Effect": "Deny", "Action": "s3:*", "Resource": "arn:aws:s3:::DOC-EXAMPLE-BUCKET" } ] }. Option B is correct because it uses a Deny effect with the correct ARN format for a federated user (arn:aws:sts::account-id:federated-user/Bob). An explicit Deny in a bucket policy will override any Allow permissions Bob has for this specific S3 bucket, while leaving all his…

Submitted by tunde_lagos· Mar 6, 2026Identity and Access Management - Implement and manage IAM policies, resource-based policies, and federated access controls to enforce least-privilege permissions

Question

A company wants to deny a specific federated user named Bob access to an Amazon S3 bucket named DOC-EXAMPLE-BUCKET. The company wants to meet this requirement by using a bucket policy. The company also needs to ensure that this bucket policy affects Bob's S3 permissions only. Any other permissions that Bob has must remain intact. Which policy should the company use to meet these requirements? A. B. C. D.

Exhibits

SCS-C02 question #197 exhibit 1
SCS-C02 question #197 exhibit 2
SCS-C02 question #197 exhibit 3
SCS-C02 question #197 exhibit 4

Options

  • A{ "Version": "2012-10-17", "Statement": [ { "Principal": { "AWS": "arn:aws:sts::account-id:federated-user/Bob" }, "Effect": "Allow", "Action": "s3:*", "Resource": "arn:aws:s3:::DOC-EXAMPLE-BUCKET" } ] }
  • B{ "Version": "2012-10-17", "Statement": [ { "Principal": { "AWS": "arn:aws:sts::account-id:federated-user/Bob" }, "Effect": "Deny", "Action": "s3:*", "Resource": "arn:aws:s3:::DOC-EXAMPLE-BUCKET" } ] }
  • C{ "Version": "2012-10-17", "Statement": [ { "Principal": { "AWS": "arn:aws:iam::account-id:user/Bob" }, "Effect": "Deny", "Action": "s3:*", "Resource": "arn:aws:s3:::DOC-EXAMPLE-BUCKET" } ] }
  • D{ "Version": "2012-10-17", "Statement": [ { "Principal": { "AWS": "arn:aws:sts::account-id:assumed-role/Bob" }, "Effect": "Deny", "Action": "s3:*", "Resource": "arn:aws:s3:::DOC-EXAMPLE-BUCKET" } ] }

How the community answered

(32 responses)
  • A
    16% (5)
  • B
    72% (23)
  • C
    9% (3)
  • D
    3% (1)

Explanation

Option B is correct because it uses a Deny effect with the correct ARN format for a federated user (arn:aws:sts::account-id:federated-user/Bob). An explicit Deny in a bucket policy will override any Allow permissions Bob has for this specific S3 bucket, while leaving all his other permissions (non-S3 or other buckets) completely unaffected. Using Deny in a resource-based policy is the precise way to block access for a specific principal without modifying their identity-based policies.

Topics

#S3 Bucket Policies#IAM Federated Users#AWS STS#Explicit Deny

Community Discussion

No community discussion yet for this question.

Full SCS-C02 Practice