Question 228 of 1,705
Network ImplementationmediumMultiple ChoiceObjective-mapped

Quick Answer

The correct answer is to create a gateway endpoint for S3 in the VPC and add a route in the private subnet’s route table pointing to the endpoint. This works because a gateway endpoint uses AWS’s private network to connect the VPC directly to S3, keeping traffic entirely within the AWS backbone and avoiding internet exposure, all at no additional cost. On the AWS Certified Advanced Networking Specialty ANS-C01 exam, this question tests your understanding of VPC endpoint types and their appropriate use cases—specifically that S3 and DynamoDB support gateway endpoints, not interface endpoints. A common trap is assuming a NAT gateway is needed for private subnet connectivity, but that introduces cost and security risks. Remember the memory tip: “S3 and DynamoDB go through the gateway—no IP, no cost, no internet.”

ANS-C01 Network Implementation Practice Question

This ANS-C01 practice question tests your understanding of network implementation. 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 public and private subnets. An EC2 instance in a private subnet needs to access an S3 bucket in the same Region. Which solution provides the most secure and cost-effective connectivity?

Question 1mediummultiple choice
Review the full subnetting walkthrough →

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 gateway endpoint for S3 in the VPC and add a route in the private subnet's route table pointing to the endpoint.

Option B is correct because a gateway endpoint for S3 is free and provides private connectivity to S3 without traversing the internet. Option A is wrong because an internet gateway would expose the instance to the internet and incur costs. Option C is wrong because a NAT gateway incurs costs and is less secure than a VPC endpoint. Option D is wrong because an interface endpoint for S3 is not available; S3 uses gateway endpoints.

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 NAT gateway in a public subnet and add a route in the private subnet's route table pointing to the NAT gateway.

    Why it's wrong here

    A NAT gateway incurs hourly charges and data processing costs, and traffic goes over the internet.

  • Create an interface endpoint for S3 in the private subnet.

    Why it's wrong here

    Interface endpoints are not available for S3; S3 uses gateway endpoint type.

  • Attach an internet gateway to the VPC and add a route to the internet gateway in the private subnet's route table.

    Why it's wrong here

    This would allow the instance to access the internet, which is less secure and not required for S3 access in the same Region.

  • Create a gateway endpoint for S3 in the VPC and add a route in the private subnet's route table pointing to the endpoint.

    Why this is correct

    A gateway endpoint provides private, cost-effective access to S3 without internet connectivity.

    Related concept

    CIDR notation defines the prefix length.

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.

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 Implementation — This question tests Network Implementation — CIDR notation defines the prefix length..

What is the correct answer to this question?

The correct answer is: Create a gateway endpoint for S3 in the VPC and add a route in the private subnet's route table pointing to the endpoint. — Option B is correct because a gateway endpoint for S3 is free and provides private connectivity to S3 without traversing the internet. Option A is wrong because an internet gateway would expose the instance to the internet and incur costs. Option C is wrong because a NAT gateway incurs costs and is less secure than a VPC endpoint. Option D is wrong because an interface endpoint for S3 is not available; S3 uses gateway endpoints.

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.

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

3 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 download patches from an S3 bucket in the same region. The company wants to minimize data transfer costs and avoid traversing the internet. Which solution should the company implement?

medium
  • A.Create a VPC Interface Endpoint for S3 and attach it to the private subnet.
  • B.Configure an S3 bucket policy to allow access from the VPC and use an Internet Gateway.
  • C.Create a VPC Gateway Endpoint for S3 and attach it to the private subnet's route table.
  • D.Create a NAT Gateway in the public subnet and route traffic to the S3 bucket through it.

Why C: Option B is correct because a VPC Gateway Endpoint for S3 allows private connectivity to S3 without internet, reducing costs. Option A is wrong because a NAT Gateway incurs costs and uses internet. Option C is wrong because a VPC Interface Endpoint for S3 is also charged per hour and per GB. Option D is wrong because an S3 bucket policy does not provide 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 an S3 bucket. The company wants to minimize data transfer costs and avoid traversing the internet. Which solution should be implemented?

medium
  • A.Use an Interface VPC Endpoint for S3
  • B.Use AWS Direct Connect
  • C.Set up a NAT Gateway in the public subnet and route traffic through it
  • D.Create a Gateway VPC Endpoint for S3

Why D: Option C is correct because a Gateway VPC Endpoint for S3 provides private connectivity to S3 without internet access, reducing costs. Option A would use internet. Option B is for other AWS services. Option D is for dedicated connectivity.

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 ensure that traffic to S3 does not traverse the internet. Which solution should a network engineer implement?

medium
  • A.Create a VPC interface endpoint for S3 and attach it to the private subnet.
  • B.Deploy an S3 VPN endpoint in the VPC.
  • C.Create a VPC gateway endpoint for S3 and add a route to the S3 prefix list via the endpoint.
  • D.Set up a NAT gateway in the public subnet and add a route to the S3 prefix list via the NAT gateway.

Why C: Option B is correct. A VPC gateway endpoint for S3 allows private connectivity to S3 without internet. Option A is wrong because a NAT gateway still traverses the internet. Option C is wrong because a VPC interface endpoint for S3 is not supported (S3 uses gateway endpoints). Option D is wrong because an S3 VPN endpoint is not an AWS service.

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.