Question 403 of 1,748
Identity and Access ManagementmediumMultiple ChoiceObjective-mapped

Restrict IAM User to Only s3:PutObject on a Specific Bucket

This SCS-C02 practice question tests your understanding of identity and access management. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. A key principle to apply: iAM Policy Evaluation Logic. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A security engineer notices that an IAM user, 'svc-backup', has full S3 access (s3:*) to all buckets. The engineer wants to restrict the user to only put objects into a specific bucket named 'mycompany-backup' and deny all other S3 actions. Which IAM policy should be attached?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

{"Version":"2012-10-17","Statement":[{"Effect":"Deny","NotAction":"s3:PutObject","Resource":"*","Condition":{...}}]}

Option B is correct because it uses Deny with NotAction to deny all S3 actions except s3:PutObject. This ensures that only PutObject is allowed, and any existing full S3 access policy will be overridden by the explicit Deny for all other actions. Option A is incorrect because it only allows PutObject without denying other actions; if the user has any other policy granting S3 access, those actions would still be permitted. Option C is incorrect because it allows all S3 actions on the specific bucket, granting more permissions than intended. Option D is incorrect because the explicit Deny on all S3 actions overrides the Allow for PutObject, resulting in denial of all S3 actions including PutObject.

Key principle: IAM Policy Evaluation Logic

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • {"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"s3:PutObject","Resource":"arn:aws:s3:::mycompany-backup/*"}]}

    Why it's wrong here

    This policy only allows s3:PutObject but does not deny other S3 actions. If the user has any other policy granting S3 permissions (like the existing full access), those actions would still be allowed.

  • {"Version":"2012-10-17","Statement":[{"Effect":"Deny","NotAction":"s3:PutObject","Resource":"*","Condition":{...}}]}

    Why this is correct

    This policy uses Deny with NotAction to deny all S3 actions except s3:PutObject. This explicitly restricts the user to only PutObject on any resource, effectively overriding any broader allow policies.

    Related concept

    IAM Policy Evaluation Logic

  • {"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"s3:*","Resource":"arn:aws:s3:::mycompany-backup/*"}]}

    Why it's wrong here

    This policy allows all S3 actions (s3:*) on the specific bucket, granting far more permissions than the intended restriction of only PutObject.

  • {"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"s3:PutObject","Resource":"arn:aws:s3:::mycompany-backup/*"},{"Effect":"Deny","Action":"s3:*","Resource":"*"}]}

    Why it's wrong here

    The Deny statement for all S3 actions (s3:*) overrides the Allow for s3:PutObject due to the explicit deny override rule, resulting in the user being denied all S3 actions including PutObject.

Common exam traps

Common exam trap: answer the scenario, not the keyword

A common trap is thinking that an Allow + Deny combination works by allowing the specific action and denying others. However, an explicit Deny on all actions (s3:*) overrides any Allow, including the Allow for PutObject. The correct approach is to use Deny with NotAction to deny everything except the allowed action.

Detailed technical explanation

How to think about this question

Treat this as a scenario question. Identify the problem, the constraint, and the best action. Then compare each option against those facts.

KKey Concepts to Remember

  • IAM Policy Evaluation Logic
  • NotAction
  • Explicit Deny
  • Least Privilege

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

IAM Policy Evaluation Logic

Real-world example

How this comes up in practice

A media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.

Visual reference

Source Router + ACL permit 10.0.0.0/8 deny any Server 10.0.0.5 ✓ 192.168.1.1 ✗ dropped ACLs evaluate top-down; first match wins — implicit deny all at end

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

What to study next

Got this wrong? Here's your next step.

Review iAM Policy Evaluation Logic, then practise related SCS-C02 questions on the same topic to reinforce the concept.

Related practice questions

Related SCS-C02 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free SCS-C02 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this SCS-C02 question test?

Identity and Access Management — This question tests Identity and Access Management — IAM Policy Evaluation Logic.

What is the correct answer to this question?

The correct answer is: {"Version":"2012-10-17","Statement":[{"Effect":"Deny","NotAction":"s3:PutObject","Resource":"*","Condition":{...}}]} — Option B is correct because it uses Deny with NotAction to deny all S3 actions except s3:PutObject. This ensures that only PutObject is allowed, and any existing full S3 access policy will be overridden by the explicit Deny for all other actions. Option A is incorrect because it only allows PutObject without denying other actions; if the user has any other policy granting S3 access, those actions would still be permitted. Option C is incorrect because it allows all S3 actions on the specific bucket, granting more permissions than intended. Option D is incorrect because the explicit Deny on all S3 actions overrides the Allow for PutObject, resulting in denial of all S3 actions including PutObject.

What should I do if I get this SCS-C02 question wrong?

Review iAM Policy Evaluation Logic, then practise related SCS-C02 questions on the same topic to reinforce the concept.

What is the key concept behind this question?

IAM Policy Evaluation Logic

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

2 more ways this is tested on SCS-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A company is using IAM roles to grant EC2 instances access to an S3 bucket. The security team wants to ensure that the instances can only access their own bucket. Which policy should be attached to the IAM role to enforce this?

medium
  • A.{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"s3:*","Resource":"*"}]}
  • B.{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"s3:GetObject","Resource":"*"}]}
  • C.{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"s3:GetObject","Resource":"*","Condition":{"IpAddress":{"aws:SourceIp":"10.0.0.0/16"}}}]}
  • D.{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"s3:GetObject","Resource":"arn:aws:s3:::my-bucket/*"}]}

Why D: The correct approach is to restrict the IAM role's permissions to only the specific S3 bucket. Option D uses a resource ARN that limits access to the 'my-bucket' bucket, ensuring instances can only access their own bucket. Option A allows all S3 actions on all resources, which is too permissive. Option B allows GetObject on all resources, not restricted to a specific bucket. Option C uses an IP address condition, which is not applicable for EC2 instances because they access S3 via the IAM role, not a specific source IP. Therefore, only option D correctly enforces the requirement.

Variation 2. A security engineer is designing a system to manage access to an S3 bucket containing confidential data. Which TWO actions should the engineer take to implement least privilege?

medium
  • A.Use a condition in the IAM policy to restrict access to requests from a specific IP range.
  • B.Grant only the specific S3 actions needed (e.g., s3:GetObject) rather than s3:*
  • C.Use a policy that allows s3:* for all users in the organization.
  • D.Make the bucket public and rely on object ACLs to restrict access.
  • E.Use pre-signed URLs for all access to the bucket.

Why A: Option A is correct: Using a condition in the IAM policy to restrict access to a specific IP range limits access to known networks, enforcing least privilege. Option B is correct: Granting only specific S3 actions (e.g., s3:GetObject) instead of s3:* ensures that users have only the permissions necessary for their tasks. Option C is incorrect because allowing s3:* for all users violates least privilege. Option D is incorrect because making the bucket public and relying on object ACLs does not provide fine-grained control and can lead to over-permissive access. Option E is incorrect because pre-signed URLs are used for temporary access, but they do not replace the need for least privilege policies for ongoing access.

Keep practising

More SCS-C02 practice questions

Last reviewed: Jun 20, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This SCS-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SCS-C02 exam.