Courseiva
Question 526 of 1,660
Accelerate Workload Migration and ModernizationhardMultiple ChoiceObjective-mapped

SAP-C02 Practice Question: Accelerate Workload Migration and Modernization

Exhibit

Refer to the exhibit.

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:GetObject",
        "s3:PutObject"
      ],
      "Resource": "arn:aws:s3:::my-bucket/*"
    },
    {
      "Effect": "Deny",
      "Action": "s3:*",
      "Resource": "arn:aws:s3:::my-bucket/secret/*",
      "Condition": {
        "IpAddress": {
          "aws:SourceIp": "10.0.0.0/8"
        }
      }
    }
  ]
}
```

Refer to the exhibit. An IAM policy is attached to an IAM user. The user tries to upload an object to `s3://my-bucket/secret/data.txt` from an IP address in the 10.0.0.0/8 range. What will happen?

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

The upload fails because the Deny statement explicitly denies s3:PutObject for the prefix secret/ from the specified IP range.

The Deny statement explicitly denies all s3 actions (s3:*) for objects with the prefix secret/ when the source IP is in the 10.0.0.0/8 range. Since the user's IP is in that range and the object path starts with secret/, the Deny applies and overrides the Allow statement. Therefore, the upload fails. Options A and B claim success, which is incorrect. Option C says it fails because the Deny is unconditional, but the Deny is conditional on the IP range and prefix, so C is inaccurate. Option D correctly identifies the explicit Deny for s3:PutObject (which is included in s3:*) under the given conditions.

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 upload succeeds because the Allow statement grants s3:PutObject.

    Why it's wrong here

    The Deny overrides the Allow when conditions match.

  • The upload succeeds because the Deny statement only applies to GetObject, not PutObject.

    Why it's wrong here

    Deny uses s3:* which includes PutObject.

  • The upload fails because the Deny statement denies all s3 actions unconditionally.

    Why it's wrong here

    The Deny is conditional on the IP address.

  • The upload fails because the Deny statement explicitly denies s3:PutObject for the prefix secret/ from the specified IP range.

    Why this is correct

    Deny overrides Allow, and conditions match.

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

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

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 SAP-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 SAP-C02 exam.