Question 1,078 of 1,738
Infrastructure SecurityhardMultiple ChoiceObjective-mapped

Quick Answer

The correct answer is to create a Gateway VPC Endpoint for S3 and update the route table. This configuration allows an EC2 instance in a private subnet to access S3 without internet access, using AWS’s internal network instead of traversing a NAT Gateway, Internet Gateway, or public internet. A Gateway Endpoint uses prefix lists in the route table to direct S3 traffic privately, making it both more secure and more cost-effective than an Interface Endpoint, which incurs hourly charges and requires additional DNS resolution. On the AWS Certified Security Specialty SCS-C02 exam, this question tests your understanding of VPC networking security and the principle of least privilege—specifically, how to keep traffic within the AWS backbone. A common trap is choosing an Interface Endpoint for S3, but remember: S3 and DynamoDB are the only services that support Gateway Endpoints, which are free and simpler. Memory tip: “Gateway for S3—no gateway to the internet needed.”

SCS-C02 Infrastructure Security Practice Question

This SCS-C02 practice question tests your understanding of infrastructure security. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. 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 multiple subnets. An EC2 instance in a private subnet needs to access an S3 bucket. Which configuration provides the most secure and efficient access?

Question 1hardmultiple 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 VPC Endpoint for S3 and update the route table.

Option B is correct because a Gateway VPC Endpoint for S3 allows private access to S3 without going through the internet or NAT Gateway, and it is more secure. Option A is wrong because it goes through the internet. Option C is wrong because Interface Endpoints are more costly and complex for S3. Option D is wrong because internet access still goes through 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 an Interface VPC Endpoint for S3.

    Why it's wrong here

    Interface Endpoints are for services that use PrivateLink; S3 typically uses Gateway Endpoints.

  • Create a Gateway VPC Endpoint for S3 and update the route table.

    Why this is correct

    Private and secure access to S3.

    Related concept

    CIDR notation defines the prefix length.

  • Route the traffic through a NAT Gateway to the internet.

    Why it's wrong here

    Uses internet, less secure.

  • Assign a public IP address to the EC2 instance and allow it to access S3 via internet.

    Why it's wrong here

    Insecure and exposes instance.

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 SCS-C02 subnetting questions on CIDR, address ranges, and subnet selection.

Related practice questions

Related SCS-C02 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 SCS-C02 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 SCS-C02 question test?

Infrastructure Security — This question tests Infrastructure Security — CIDR notation defines the prefix length..

What is the correct answer to this question?

The correct answer is: Create a Gateway VPC Endpoint for S3 and update the route table. — Option B is correct because a Gateway VPC Endpoint for S3 allows private access to S3 without going through the internet or NAT Gateway, and it is more secure. Option A is wrong because it goes through the internet. Option C is wrong because Interface Endpoints are more costly and complex for S3. Option D is wrong because internet access still goes through the internet.

What should I do if I get this SCS-C02 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 SCS-C02 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 SCS-C02

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 public and private subnets. An EC2 instance in a private subnet needs to access an S3 bucket to store logs. The security team wants to ensure that traffic does not traverse the internet. Which solution should be used? (Choose two.)

hard
  • A.Create an S3 Gateway Endpoint in the VPC
  • B.Attach a VPC Endpoint Policy to the Gateway Endpoint to restrict access to the specific bucket
  • C.Attach an Internet Gateway to the VPC
  • D.Create an S3 Interface Endpoint in the VPC
  • E.Use a NAT Gateway to route the traffic to the internet

Why A: A VPC Gateway Endpoint (option A) allows instances in a private subnet to access S3 without traversing the internet by routing traffic through AWS's internal network. This is the correct foundational component because it uses prefix lists in the route table to direct S3 traffic to the endpoint, bypassing the need for an Internet Gateway or NAT Gateway.

Variation 2. A company has a VPC with a public subnet and a private subnet. They launch an EC2 instance in the private subnet with a default security group that allows all outbound traffic. The instance needs to download files from an S3 bucket in the same region. Which configuration allows this without internet access?

hard
  • A.Set up an AWS Direct Connect connection to the S3 bucket.
  • B.Create a VPC gateway endpoint for S3 and add a route to the private subnet's route table.
  • C.Attach an internet gateway to the VPC and add a route to the private subnet.
  • D.Create a NAT gateway in the public subnet and add a route to the private subnet's route table.

Why B: A VPC gateway endpoint for S3 allows private instances to access S3 without internet. Option C is correct. NAT gateway (A) would require internet. Internet gateway (B) would expose instance. Direct Connect (D) is for on-premises.

Variation 3. 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 costs and avoid NAT Gateway or NAT Instance charges. Which solution should be used?

hard
  • A.Deploy a proxy instance in a public subnet and configure the private instance to use the proxy.
  • B.Use an egress-only internet gateway for the private subnet.
  • C.Attach an internet gateway to the VPC and add a route to the private subnet route table pointing to the internet gateway.
  • D.Create a VPC Gateway Endpoint for S3 and configure the instance to download patches from S3.

Why D: Option C is correct because a VPC Gateway Endpoint is used for S3 and DynamoDB, not for general internet access. For general internet access, a NAT device is required. However, if the patches are hosted on S3, a Gateway Endpoint is free. Option A is wrong because an internet gateway alone cannot be used from private subnets. Option B is wrong because an egress-only internet gateway is for IPv6. Option D is wrong because a proxy instance incurs costs.

Keep practising

More SCS-C02 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 SCS-C02 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 SCS-C02 exam.