You have a public subnet and a private subnet in a VPC. To allow instances in the private subnet internet access without exposing them directly, how should you configure the route tables?
hard📝 Architecture Q8 of 15
AWS - VPC Fundamentals
You have a public subnet and a private subnet in a VPC. To allow instances in the private subnet internet access without exposing them directly, how should you configure the route tables?
APublic subnet route table directs 0.0.0.0/0 to NAT Gateway; private subnet route table directs 0.0.0.0/0 to Internet Gateway
BBoth subnets use the same route table with 0.0.0.0/0 to Internet Gateway
CPrivate subnet route table directs 0.0.0.0/0 to Internet Gateway; public subnet has no 0.0.0.0/0 route
DPublic subnet route table directs 0.0.0.0/0 to an Internet Gateway; private subnet route table directs 0.0.0.0/0 to a NAT Gateway
Step-by-Step Solution
Solution:
Step 1: Understand subnet roles
Public subnet has direct internet access via Internet Gateway.
Step 2: Private subnet internet access
Private subnet uses NAT Gateway in public subnet for outbound internet.
Step 3: Configure route tables accordingly
Public subnet route table points 0.0.0.0/0 to IGW; private subnet route table points 0.0.0.0/0 to NAT Gateway.
Final Answer:
Public subnet route table directs 0.0.0.0/0 to an Internet Gateway; private subnet route table directs 0.0.0.0/0 to a NAT Gateway -> Option D
Quick Check:
Private subnet uses NAT Gateway for internet [OK]
Quick Trick:Private subnet routes 0.0.0.0/0 to NAT Gateway [OK]
Common Mistakes:
Assigning Internet Gateway directly to private subnet
Using same route table for both subnets
Master "VPC Fundamentals" in AWS
9 interactive learning modes - each teaches the same concept differently