Courseiva
Network ImplementationhardMultiple ChoiceObjective-mapped

Override Default Route for S3: Internet Gateway vs Direct Connect

A company has a Direct Connect connection with a private VIF to a VPC. The VPC has a virtual private gateway (VGW) attached. The on-premises network advertises a prefix 10.0.0.0/8 over BGP. The VPC has subnets with CIDR 10.0.1.0/24 and 10.0.2.0/24. The company wants to ensure that traffic to on-premises uses Direct Connect. However, traffic to an S3 bucket uses the internet. What route configuration is required?

Quick Answer

The correct answer is to add specific routes for S3 public IP prefixes pointing to the internet gateway. This works because of the longest prefix match rule in AWS route tables: a more specific route to the S3 prefixes (e.g., a /32 or a range from the S3 IP list) will override the general 10.0.0.0/8 route learned over Direct Connect via the virtual private gateway, forcing S3 traffic out to the internet instead. On the AWS Certified Advanced Networking Specialty ANS-C01 exam, this scenario tests your understanding of how to selectively override default or BGP-advertised routes without breaking connectivity to on-premises networks. A common trap is assuming you can simply delete the Direct Connect route or change the VPC CIDR, but neither is valid—you must add explicit, more specific routes. Memory tip: think of it as "specific beats general"—the IGW route for S3 is the narrowest path, so it wins every time.

⚠ Common exam trap

The trap is assuming that a default route (0.0.0.0/0) to the internet gateway is sufficient, but that would also send all non-matching traffic (e.g., to the internet) via IGW, which might be undesirable. The correct approach is to add specific routes for S3 public IP prefixes to the IGW, leaving the propagated 10.0.0.0/8 route for on-premises traffic.

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

Add specific routes for S3 public IP prefixes pointing to the internet gateway.

S3 public IP prefixes are not within the on-premises advertised prefix 10.0.0.0/8. Without explicit routes for S3, traffic to S3 would use the default route (if any) or be dropped. By adding specific routes for S3 public IP prefixes pointing to the internet gateway, S3 traffic is forced over the internet while all other traffic (including to on-premises) uses the Direct Connect private VIF via the propagated 10.0.0.0/8 route.

Answer analysis

Option-by-option breakdown

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

  • Change the VPC CIDR to avoid overlap with on-premises.

    Why it's wrong here

    Overlap is not the issue; routing decision is.

  • Add specific routes for S3 public IP prefixes pointing to the internet gateway.

    Why this is correct

    More specific routes override the general route to VGW, directing S3 traffic to IGW.

  • Add a static route for 0.0.0.0/0 pointing to the internet gateway.

    Why it's wrong here

    This sends all internet traffic via IGW, but on-premises traffic would also go to IGW, not Direct Connect.

  • Add a static route in the VPC route table for 0.0.0.0/0 pointing to the VGW.

    Why it's wrong here

    This sends all traffic including S3 through Direct Connect.

Visual reference

192.168.1.0 /24 256 addresses (254 usable) 192.168.1.0 /25 Subnet A 128 addr (126 usable) 192.168.1.128 /25 Subnet B 128 addr (126 usable) Borrowing 1 bit from host portion creates 2 subnets (/25)

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

Same concept, more angles

1 more way 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 Direct Connect connection with a private VIF to a VPC. The on-premises network is advertising a default route (0.0.0.0/0) over BGP. The VPC has an internet gateway attached. When an EC2 instance in the VPC sends traffic to an internet destination, which path does it take by default?

hard
  • A.Traffic goes to the on-premises network only if there is a static route.
  • B.Traffic is dropped because there is no route.
  • C.Traffic goes to the internet via the internet gateway.
  • D.Traffic goes to the on-premises network via Direct Connect.

Why D: When an on-premises network advertises a default route (0.0.0.0/0) over BGP via a Direct Connect private VIF, that route is propagated into the VPC route tables as a static route. By default, the most specific route (longest prefix match) is preferred, but since both the internet gateway and the BGP-advertised route are for 0.0.0.0/0, the BGP route takes precedence because it is learned via a more specific path (Direct Connect) and is considered a static route in the VPC route table, overriding the internet gateway's implicit route.

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.