The answer is that the bucket policy uses Allow instead of Deny, so an explicit Deny is required to block uploads that fail the IP condition. When an IAM role has its own IAM policy that grants s3:PutObject without any IP restriction, that unconditional Allow from the role’s policy remains in effect. The bucket policy’s conditional Allow statement simply does not apply when the source IP is outside 10.0.0.0/16, but because there is no explicit Deny, the role’s IAM policy still permits the upload. This is a classic trap on the AWS Certified Security Specialty SCS-C02 exam: resource-based policies like S3 bucket policies only override IAM permissions when they explicitly deny, not when they conditionally allow. The aws:SourceIp condition key works correctly with IAM roles—it checks the client’s IP—but it must be paired with a Deny effect to enforce the restriction. Memory tip: “Allow is a door that can be left open; Deny is the lock that keeps it shut.”
SCS-C02 Infrastructure Security Practice Question
This SCS-C02 practice question tests your understanding of infrastructure security. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. 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.
Refer to the exhibit. A security engineer creates the S3 bucket policy above to allow an IAM role to upload objects only from the corporate network IP range (10.0.0.0/16). However, users report that they can still upload objects from outside the range when assuming the role. What is the most likely cause?
Clue words in this question
Noticing these words before you look at the options changes how you read each choice.
Clue: "most likely"
Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The bucket policy uses Allow instead of Deny; an explicit Deny is needed to block requests that do not meet the condition.
The condition key aws:SourceIp checks the IP address of the principal making the request. When using an IAM role, the source IP is that of the role's session, not the end user. If the role is assumed from outside the corporate network, the source IP will be the external IP of the client machine, not the corporate range. The condition should use aws:SourceIdentity or similar? Actually, aws:SourceIp works for the client IP of the request. But if the role is assumed by a user outside the network, the request comes from that user's IP. However, the condition should work. Wait: The issue might be that the policy allows the role, but the role itself might have permissions that override? Or the condition is incorrectly applied? The most likely cause is that the condition key aws:SourceIp does not work when the request is made via AWS CLI or SDK from outside? Actually, it should. Another common issue: The condition aws:SourceIp is evaluated against the IP address of the principal, but if the role is assumed by an EC2 instance, the source IP is the instance's private IP? No, that's for VPC endpoints. Hmm. Let's think about typical exam: The condition aws:SourceIp does not work for requests that come from within a VPC because the source IP is the private IP? Actually, if the role is assumed by an EC2 instance inside the VPC, the source IP is the instance's private IP, which might be within 10.0.0.0/16. But if the role is assumed by a user outside the network, the source IP is the user's public IP, which might not be in 10.0.0.0/16. So the condition should block. But the question says users can still upload from outside. Possible cause: The condition key is misspelled? No. Another possibility: The policy allows the role, but the role has its own policy that allows s3:PutObject without the condition. Actually, the bucket policy grants the role permission conditionally, but if the role itself has an IAM policy that grants the same action without the condition, the user might be able to upload using the role's permissions? No, both policies must be satisfied? Actually, if the role has an IAM policy that allows s3:PutObject without conditions, the user assuming the role could upload from anywhere because the role's policy is effective. The bucket policy adds additional restrictions but does not override the role's IAM policy. Wait, that's not correct: For access to S3, if the principal has IAM permissions, the bucket policy can further restrict or allow. But if the IAM policy allows the action, the bucket policy can deny it. However, if the bucket policy allows conditionally, and the IAM policy allows unconditionally, the effective permission is allow because the bucket policy does not deny. Actually, the evaluation logic: by default, all requests are denied. An explicit allow in either IAM or bucket policy is not enough; both must allow? No, the AWS access control policy evaluation: An explicit allow in either IAM or bucket policy will allow access, unless there is an explicit deny. So if the IAM role has an explicit allow for s3:PutObject without condition, and the bucket policy has an explicit allow with condition, the request is allowed if the condition is met, but if the condition is not met, the bucket policy does not grant allow, but the IAM policy still grants allow? Actually, the bucket policy is a resource-based policy; if it does not grant access (because condition fails), it is not an explicit allow, but it is not an explicit deny either. The IAM policy explicitly allows the action. The net effect is that the request is allowed because there is an explicit allow from the IAM policy and no explicit deny from the bucket policy. Wait, but the bucket policy has an allow statement with a condition; if the condition is not met, the statement does not apply, so it's as if the bucket policy does not have that statement. So the IAM policy's allow stands. Therefore, the bucket policy condition is ineffective if the IAM policy already allows the action. To enforce the condition, the bucket policy must include a Deny statement for requests not meeting the condition. That is a common gotcha. So the correct answer is that the bucket policy should use a Deny effect, not Allow. Or the IAM policy should be more restrictive. So the most likely cause: The bucket policy uses Allow instead of Deny.
Key principle: ACLs process entries top to bottom and stop at the first match. Entry order and interface direction matter as much as the permit or deny statement.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
✗
The condition key aws:SourceIp does not support the IP range 10.0.0.0/16 because it is a private IP range.
Why it's wrong here
aws:SourceIp works with any IP range, including private.
✓
The bucket policy uses Allow instead of Deny; an explicit Deny is needed to block requests that do not meet the condition.
Why this is correct
Because the IAM role already has an Allow, an Allow with condition does not restrict; a Deny is required.
Clue confirmation
The clue word "most likely" in the question point toward this answer.
Related concept
Standard ACLs match source addresses.
✗
The IAM role's trust policy does not restrict who can assume the role.
Why it's wrong here
Trust policy restricts who can assume, but does not affect the condition evaluation.
✗
The resource ARN should not include the trailing /*.
Why it's wrong here
The trailing /* is correct for object-level permissions.
Common exam traps
Common exam trap: ACLs stop at the first match
ACLs are processed top to bottom. The first matching entry wins, and an implicit deny usually exists at the end.
Detailed technical explanation
How to think about this question
ACL questions test precision: source, destination, protocol, port and direction. A generally correct ACL can still fail if it is applied on the wrong interface or in the wrong direction.
KKey Concepts to Remember
Standard ACLs match source addresses.
Extended ACLs can match source, destination, protocol and ports.
The first matching ACL entry is used.
There is usually an implicit deny at the end.
TExam Day Tips
→Check inbound versus outbound direction.
→Read the ACL from top to bottom.
→Look for a broader permit or deny above the intended line.
Key takeaway
ACLs process entries top to bottom and stop at the first match. Entry order and interface direction matter as much as the permit or deny statement.
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.
What to study next
Got this wrong? Here's your next step.
Review ACL processing order, placement rules (standard near destination, extended near source), and inbound vs outbound direction. Study wildcard masks and implicit deny. Then practise related SCS-C02 ACL questions on filtering logic and placement.
Infrastructure Security — This question tests Infrastructure Security — Standard ACLs match source addresses..
What is the correct answer to this question?
The correct answer is: The bucket policy uses Allow instead of Deny; an explicit Deny is needed to block requests that do not meet the condition. — The condition key aws:SourceIp checks the IP address of the principal making the request. When using an IAM role, the source IP is that of the role's session, not the end user. If the role is assumed from outside the corporate network, the source IP will be the external IP of the client machine, not the corporate range. The condition should use aws:SourceIdentity or similar? Actually, aws:SourceIp works for the client IP of the request. But if the role is assumed by a user outside the network, the request comes from that user's IP. However, the condition should work. Wait: The issue might be that the policy allows the role, but the role itself might have permissions that override? Or the condition is incorrectly applied? The most likely cause is that the condition key aws:SourceIp does not work when the request is made via AWS CLI or SDK from outside? Actually, it should. Another common issue: The condition aws:SourceIp is evaluated against the IP address of the principal, but if the role is assumed by an EC2 instance, the source IP is the instance's private IP? No, that's for VPC endpoints. Hmm. Let's think about typical exam: The condition aws:SourceIp does not work for requests that come from within a VPC because the source IP is the private IP? Actually, if the role is assumed by an EC2 instance inside the VPC, the source IP is the instance's private IP, which might be within 10.0.0.0/16. But if the role is assumed by a user outside the network, the source IP is the user's public IP, which might not be in 10.0.0.0/16. So the condition should block. But the question says users can still upload from outside. Possible cause: The condition key is misspelled? No. Another possibility: The policy allows the role, but the role has its own policy that allows s3:PutObject without the condition. Actually, the bucket policy grants the role permission conditionally, but if the role itself has an IAM policy that grants the same action without the condition, the user might be able to upload using the role's permissions? No, both policies must be satisfied? Actually, if the role has an IAM policy that allows s3:PutObject without conditions, the user assuming the role could upload from anywhere because the role's policy is effective. The bucket policy adds additional restrictions but does not override the role's IAM policy. Wait, that's not correct: For access to S3, if the principal has IAM permissions, the bucket policy can further restrict or allow. But if the IAM policy allows the action, the bucket policy can deny it. However, if the bucket policy allows conditionally, and the IAM policy allows unconditionally, the effective permission is allow because the bucket policy does not deny. Actually, the evaluation logic: by default, all requests are denied. An explicit allow in either IAM or bucket policy is not enough; both must allow? No, the AWS access control policy evaluation: An explicit allow in either IAM or bucket policy will allow access, unless there is an explicit deny. So if the IAM role has an explicit allow for s3:PutObject without condition, and the bucket policy has an explicit allow with condition, the request is allowed if the condition is met, but if the condition is not met, the bucket policy does not grant allow, but the IAM policy still grants allow? Actually, the bucket policy is a resource-based policy; if it does not grant access (because condition fails), it is not an explicit allow, but it is not an explicit deny either. The IAM policy explicitly allows the action. The net effect is that the request is allowed because there is an explicit allow from the IAM policy and no explicit deny from the bucket policy. Wait, but the bucket policy has an allow statement with a condition; if the condition is not met, the statement does not apply, so it's as if the bucket policy does not have that statement. So the IAM policy's allow stands. Therefore, the bucket policy condition is ineffective if the IAM policy already allows the action. To enforce the condition, the bucket policy must include a Deny statement for requests not meeting the condition. That is a common gotcha. So the correct answer is that the bucket policy should use a Deny effect, not Allow. Or the IAM policy should be more restrictive. So the most likely cause: The bucket policy uses Allow instead of Deny.
What should I do if I get this SCS-C02 question wrong?
Review ACL processing order, placement rules (standard near destination, extended near source), and inbound vs outbound direction. Study wildcard masks and implicit deny. Then practise related SCS-C02 ACL questions on filtering logic and placement.
Are there clue words in this question I should notice?
Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
What is the key concept behind this question?
Standard ACLs match source addresses.
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 →
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 security engineer reviews the above IAM policy attached to an IAM user. The user reports that they cannot download objects from the S3 bucket 'example-bucket' when connected from the office network (IP range 10.0.0.0/16). What is the most likely cause?
hard
A.The bucket policy overrides the IAM policy
B.The policy does not allow the s3:GetObject action
✓ C.The source IP condition does not match the user's actual IP address
D.The user is not assuming the correct IAM role
Why C: Option C is correct because the policy grants access based on the source IP of the request. IAM user credentials are used, but the actual source IP must match the condition. Option A is wrong because the policy allows GetObject. Option B is wrong because the policy does not require a specific IAM role. Option D is wrong because the bucket policy is not shown; the IAM policy is the issue.
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.
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.
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.
Sign in to join the discussion.