Question 1,319 of 1,705
Network Security, Compliance and GovernancehardMultiple ChoiceObjective-mapped

VPC Gateway Endpoint for S3: Private S3 Access Without Internet

This ANS-C01 practice question tests your understanding of network security, compliance and governance. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A company has a VPC with a public subnet and a private subnet. An EC2 instance in the private subnet needs to access an S3 bucket for backups. The company wants to minimize data transfer costs and avoid traversing the internet. Which solution should be used?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "minimum / minimize"

    Why it matters: Asks for the least resource use — fewest addresses, smallest subnet, lowest overhead. Eliminate over-provisioned options even if they would technically work.

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

Create a VPC Gateway Endpoint for S3 and attach a bucket policy allowing access from the VPC

A VPC Gateway Endpoint for S3 provides private connectivity to S3 from within the VPC without needing an internet gateway, NAT gateway, or VPN. This minimizes data transfer costs and avoids internet traversal. Option A (Gateway Endpoint) is the correct solution. Option B (proxy server) introduces additional complexity and cost, and does not avoid internet traversal. Option C (Interface Endpoint) is more expensive and is not necessary because S3 supports Gateway Endpoints. Option D (public subnet with NAT) requires the instance to have a public IP and uses a NAT gateway, which incurs costs and uses the internet.

Key principle: Count usable hosts — not total addresses — and remember that the network and broadcast addresses are not available to hosts in standard IPv4 subnets.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Create a VPC Gateway Endpoint for S3 and attach a bucket policy allowing access from the VPC

    Why this is correct

    Cost-effective and private.

    Clue confirmation

    The clue word "minimum / minimize" in the question point toward this answer.

    Related concept

    CIDR notation defines the prefix length.

  • Set up a proxy server in the public subnet and configure the EC2 instance to use it

    Why it's wrong here

    Adds complexity and cost.

  • Create a VPC Interface Endpoint for S3 and associate it with the private subnet

    Why it's wrong here

    Interface endpoints are more expensive than gateway endpoints for S3.

  • Place the EC2 instance in a public subnet with a public IP and use a NAT gateway

    Why it's wrong here

    Adds cost and internet traversal.

Common exam traps

Common exam trap: usable hosts are not the same as total addresses

Subnetting questions often tempt you into counting all addresses. In normal IPv4 subnets, the network and broadcast addresses are not usable host addresses.

Detailed technical explanation

How to think about this question

Subnetting questions test whether you can identify the network, broadcast address, usable range, mask and correct subnet. Slow down enough to calculate the block size correctly.

KKey Concepts to Remember

  • CIDR notation defines the prefix length.
  • Block size helps identify subnet boundaries.
  • Network and broadcast addresses are not usable hosts in normal IPv4 subnets.
  • The required host count determines the smallest suitable subnet.

TExam Day Tips

  • Write the block size before choosing the subnet.
  • Check whether the question asks for hosts, subnets or a specific address range.
  • Do not confuse /24, /25, /26 and /27 host counts.

Key takeaway

Count usable hosts — not total addresses — and remember that the network and broadcast addresses are not available to hosts in standard IPv4 subnets.

Real-world example

How this comes up in practice

A startup's cloud architect reviews their monthly bill and notices costs are higher than expected for a long-running batch job. Switching from on-demand instances to Reserved Instances — or using Spot/Preemptible VMs — can reduce compute costs by up to 72 %. Questions like this test whether you understand the tradeoffs between commitment, flexibility, and cost across cloud pricing models.

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

What to study next

Got this wrong? Here's your next step.

Review block sizes, usable host formulas (2^n − 2), and how to find network and broadcast addresses for /24 through /30. Then practise related ANS-C01 subnetting questions on CIDR, address ranges, and subnet selection.

Related practice questions

Related ANS-C01 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free ANS-C01 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this ANS-C01 question test?

Network Security, Compliance and Governance — This question tests Network Security, Compliance and Governance — CIDR notation defines the prefix length..

What is the correct answer to this question?

The correct answer is: Create a VPC Gateway Endpoint for S3 and attach a bucket policy allowing access from the VPC — A VPC Gateway Endpoint for S3 provides private connectivity to S3 from within the VPC without needing an internet gateway, NAT gateway, or VPN. This minimizes data transfer costs and avoids internet traversal. Option A (Gateway Endpoint) is the correct solution. Option B (proxy server) introduces additional complexity and cost, and does not avoid internet traversal. Option C (Interface Endpoint) is more expensive and is not necessary because S3 supports Gateway Endpoints. Option D (public subnet with NAT) requires the instance to have a public IP and uses a NAT gateway, which incurs costs and uses the internet.

What should I do if I get this ANS-C01 question wrong?

Review block sizes, usable host formulas (2^n − 2), and how to find network and broadcast addresses for /24 through /30. Then practise related ANS-C01 subnetting questions on CIDR, address ranges, and subnet selection.

Are there clue words in this question I should notice?

Yes — watch for: "minimum / minimize". Asks for the least resource use — fewest addresses, smallest subnet, lowest overhead. Eliminate over-provisioned options even if they would technically work.

What is the key concept behind this question?

CIDR notation defines the prefix length.

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

Same concept, more angles

5 more ways this is tested on ANS-C01

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A company has a VPC with a public subnet and a private subnet. An EC2 instance in the private subnet needs to access an S3 bucket. The security team wants to ensure that traffic to S3 does not traverse the internet. Which solution meets this requirement?

hard
  • A.Create a VPC gateway endpoint for S3 and attach an endpoint policy that restricts access to the specific bucket
  • B.Establish a VPN connection to the on-premises network and route through it
  • C.Set up a NAT gateway in the public subnet and route private subnet traffic to it
  • D.Deploy a proxy server in the public subnet and configure the instance to use it

Why A: Option A is correct because a VPC gateway endpoint for S3 allows private subnet instances to access S3 without traversing the internet. Option B is wrong because a VPN connection is used to connect to on-premises networks, not to access S3 privately. Option C is wrong because a NAT gateway still routes traffic through the internet. Option D is wrong because a proxy server also introduces internet connectivity.

Variation 2. A company has a VPC with a public subnet and a private subnet. An EC2 instance in the private subnet needs to download patches from the internet. The company wants to minimize data transfer costs and avoid exposing the private instance to inbound traffic from the internet. Which solution meets these requirements?

hard
  • A.Create a VPC Gateway Endpoint for Amazon S3 and ensure the patches are hosted in S3. Route private subnet traffic to the endpoint.
  • B.Attach an internet gateway to the VPC and route the private subnet's default route to a NAT gateway in the public subnet.
  • C.Launch a NAT instance in the public subnet and route the private subnet's default route to it.
  • D.Attach an internet gateway to the VPC and assign a public IP to the EC2 instance.

Why A: The correct answer is Option A. A VPC Gateway Endpoint for Amazon S3 provides private connectivity to S3 without traversing the internet, eliminating data transfer costs and avoiding exposure to inbound traffic. Option D is incorrect because assigning a public IP and using an internet gateway would expose the instance to inbound traffic. Option B (NAT gateway) and Option C (NAT instance) incur data transfer costs and are not required when the patches are in S3 and can be accessed via a gateway endpoint.

Variation 3. A company has a VPC with a public subnet and a private subnet. An EC2 instance in the private subnet needs to access an S3 bucket. The company wants to avoid using a NAT gateway and ensure that traffic does not traverse the internet. Which solution should be used?

medium
  • A.Attach an internet gateway to the VPC and assign a public IP to the instance
  • B.Create a VPC endpoint for S3 (Gateway type) and update the route table
  • C.Set up a VPN connection to the S3 bucket
  • D.Deploy a NAT gateway in the public subnet and route traffic through it

Why B: The correct solution is to create a VPC endpoint for S3 (Gateway type) and update the route table. This allows the EC2 instance in the private subnet to access S3 privately without traversing the internet or using a NAT gateway. Option A is incorrect because attaching an internet gateway and assigning a public IP would expose the instance to the internet. Option C is incorrect because a VPN connection is not necessary for S3 access and would involve additional complexity. Option D is incorrect because a NAT gateway would route traffic through the internet, which the company wants to avoid.

Variation 4. A company has a VPC with public and private subnets. An EC2 instance in a private subnet needs to download patches from an S3 bucket in the same AWS region. The company wants to ensure that traffic does not traverse the internet. Which solution is MOST cost-effective?

hard
  • A.Attach an Internet Gateway to the VPC and route the private subnet traffic directly to S3.
  • B.Create a Gateway VPC Endpoint for S3 and add a route in the private subnet's route table to the endpoint.
  • C.Create an Interface VPC Endpoint for S3 in the private subnet.
  • D.Deploy a NAT Gateway in a public subnet and route the private subnet traffic through it to access S3.

Why B: Option B is the most cost-effective solution because a Gateway VPC Endpoint for S3 provides private connectivity to S3 without any hourly charges, and it does not require a NAT Gateway or Internet Gateway. Option A is incorrect because an Internet Gateway would route traffic through the internet, which violates the requirement and is not cost-effective. Option C is incorrect because an Interface VPC Endpoint for S3 incurs hourly charges, making it more expensive than a Gateway Endpoint. Option D is incorrect because a NAT Gateway also incurs hourly and data processing charges, and it routes traffic through the internet, which is not desired.

Variation 5. A company has a VPC with a public subnet and a private subnet. They launch an EC2 instance in the private subnet that needs to access an S3 bucket in the same region. Which approach provides the most secure and cost-effective access?

medium
  • A.Create a VPC Gateway Endpoint for S3
  • B.Use an Internet Gateway and a public IP
  • C.Set up a VPN connection to on-premises and access S3 via that
  • D.Use a NAT Gateway and route traffic through it

Why A: A VPC Gateway Endpoint for S3 provides private connectivity to S3 without leaving the AWS network, at no additional cost. Option B is incorrect because using an Internet Gateway with a public IP would expose the instance to the internet and incur data transfer costs. Option C is incorrect because a VPN connection to on-premises adds unnecessary complexity and cost for accessing a service within the same region. Option D is incorrect because a NAT Gateway would require a public IP and incur costs, and S3 traffic would still traverse the internet; a Gateway Endpoint is more secure and cost-effective.

Keep practising

More ANS-C01 practice questions

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 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.