Courseiva
Network ImplementationhardMultiple ChoiceObjective-mapped

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

Inside (Private) PC-A 10.0.0.1 PC-B 10.0.0.2 NAT Router Outside (Public) 203.0.113.1 Inside Global Server PAT: many private IPs share one public IP via unique port numbers

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

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 →

How Courseiva writes practice questions · Editorial policy

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.