ANS-C01 Network Implementation Practice Question
Exhibit
Refer to the exhibit.
```
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:GetObject"
],
"Resource": "arn:aws:s3:::example-bucket/*",
"Condition": {
"IpAddress": {
"aws:SourceIp": "10.0.0.0/16"
}
}
}
]
}
```Refer to the exhibit. The bucket policy shown is applied to an S3 bucket. A VPC endpoint for S3 is created in a VPC with CIDR 10.0.0.0/16. An EC2 instance in the VPC tries to access an object in the bucket using the VPC endpoint. The request fails. What is the most likely reason?
⚠ Common exam trap
The ANS-C01 exam often tests the distinction between `aws:SourceIp` (which works for internet-based traffic) and `aws:SourceVpce`/`aws:SourceVpc` (which are required for VPC endpoint traffic), trapping candidates who assume all condition keys work universally with VPC endpoints.
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 condition uses aws:SourceIp, which does not work with VPC endpoint traffic.
The bucket policy uses the `aws:SourceIp` condition key, which is not supported for traffic originating from a VPC endpoint. When requests are made through a VPC endpoint, the source IP address is replaced by the endpoint's private IP, making `aws:SourceIp` ineffective. To restrict access based on the VPC endpoint, you must use the `aws:SourceVpce` or `aws:SourceVpc` condition keys instead.
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 bucket policy does not allow s3:ListBucket.
Why it's wrong here
Only GetObject is needed to retrieve an object; ListBucket is not required.
- ✓
The condition uses aws:SourceIp, which does not work with VPC endpoint traffic.
Why this is correct
aws:SourceIp is not applicable for VPC endpoint requests; use aws:SourceVpce instead.
- ✗
The EC2 instance does not have an IAM role that allows s3:GetObject.
Why it's wrong here
The bucket policy allows all principals, so IAM is not required.
- ✗
The VPC endpoint does not have a route table associated with the instance's subnet.
Why it's wrong here
The route table association is needed for Gateway endpoints but not for Interface endpoints; however, the condition is the primary issue.
Visual reference
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
One of 1,621 original ANS-C01 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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This ANS-C01 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 ANS-C01 exam.