Courseiva
Accelerate Workload Migration and ModernizationmediumMultiple ChoiceObjective-mapped

SAP-C02 Practice Question: Accelerate Workload Migration and Modernization

Exhibit

Refer to the exhibit.

```
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "s3:PutObject",
      "Resource": "arn:aws:s3:::my-bucket/*",
      "Condition": {
        "IpAddress": {
          "aws:SourceIp": "203.0.113.0/24"
        }
      }
    }
  ]
}
```

Refer to the exhibit. A company is migrating an application to AWS and has attached the IAM policy shown to an IAM role. The application runs on an EC2 instance and needs to upload files to an S3 bucket. However, the uploads are failing with an access denied error. What is the most likely cause?

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 IAM policy restricts access based on source IP, but the EC2 instance's public IP is not in the allowed range

The IAM policy explicitly allows s3:PutObject, so option A is incorrect. The resource ARN is correctly formatted as arn:aws:s3:::example-bucket/*, ruling out option B. The policy includes a condition (aws:SourceIp) that restricts access to the IP range 203.0.113.0/24. The EC2 instance's public IP may not fall within this range, causing the access denied error, making option C correct. Option D is incorrect because there is no indication of a bucket policy; the deny is due to the IAM policy's IP restriction.

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 IAM policy does not allow the s3:PutObject action

    Why it's wrong here

    Incorrect: The policy allows s3:PutObject.

  • The IAM policy uses an incorrect resource ARN

    Why it's wrong here

    Incorrect: The resource ARN is correct for the bucket.

  • The IAM policy restricts access based on source IP, but the EC2 instance's public IP is not in the allowed range

    Why this is correct

    Correct: The IP condition is likely blocking the instance.

  • The S3 bucket policy denies access from the instance

    Why it's wrong here

    Incorrect: The exhibit shows an IAM policy, not a bucket policy.

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

One of 1,660 original SAP-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.