ANS-C01 Gateway VPC Endpoint Practice Question
A company has a production VPC with CIDR 10.0.0.0/16. They have an internet-facing Application Load Balancer (ALB) in public subnets across two Availability Zones. The ALB distributes traffic to a fleet of EC2 instances in private subnets. The EC2 instances need to access an Amazon S3 bucket to retrieve configuration files. The company wants to minimize data transfer costs and ensure that traffic to S3 does not traverse the internet. A network engineer created a Gateway VPC Endpoint for S3 in the VPC and added a route in the public subnet route tables pointing to the endpoint. However, the EC2 instances still cannot access the S3 bucket. The security groups for the EC2 instances allow outbound HTTPS to 0.0.0.0/0. The NACLs are default (allow all). The S3 bucket policy allows access from the VPC endpoint. What is the MOST likely reason the EC2 instances cannot access S3?
⚠ Common exam trap
A common trap is to think that adding a route to any subnet is sufficient. However, the route must be in the route table of the subnet where the instance resides. Public subnets have routes to the internet gateway, but private subnets need explicit routes to the gateway endpoint.
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 route to the Gateway VPC Endpoint was added only to public subnets, not to private subnets
The Gateway VPC Endpoint for S3 must have a route in the route tables of the subnets where the EC2 instances reside. The engineer added the route only to public subnet route tables, not the private subnets. Therefore, traffic from the EC2 instances to S3 still uses the default route (0.0.0.0/0) via NAT Gateway or Internet Gateway, not the VPC endpoint. Option A is incorrect because the endpoint is in the same region. Option B is incorrect because the security group allows outbound HTTPS to all destinations. Option C is incorrect because the S3 bucket policy includes the necessary condition.
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 Gateway VPC Endpoint is in a different region than the S3 bucket
Why it's wrong here
Incorrect; Gateway Endpoints are regional and S3 bucket is in the same region.
- ✗
The security group for the EC2 instances does not allow outbound traffic to the S3 prefix list
Why it's wrong here
Incorrect; the security group allows outbound HTTPS to 0.0.0.0/0, which includes S3.
- ✗
The S3 bucket policy does not include a condition for the VPC endpoint
Why it's wrong here
Incorrect; the bucket policy allows access from the VPC endpoint.
- ✓
The route to the Gateway VPC Endpoint was added only to public subnets, not to private subnets
Why this is correct
Correct; the route must be in the private subnet route table for EC2 instances to use the endpoint.
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
This ANS-C01 question is part of Courseiva's 1,621-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.