Interview Prep/AWS/VPC and Networking

Instances in a private subnet cannot reach the internet to download packages. What do you add?

BeginnerScenarioVPC and Networking
Answer

Situation read → Private subnets need an outbound path, typically a NAT gateway in a public subnet.

What I'd do →

  1. Create a NAT gateway in a public subnet with an Elastic IP
  2. Add 0.0.0.0/0 -> nat-0abc to the private route table
  3. Test from the instance: curl -sI https://example.com
  4. For one NAT per AZ, add one route table per AZ

Why → NAT gives outbound-only access; inbound connections from the internet still cannot be initiated.

Interview tip → Mention NAT cost and the gateway endpoint alternative for S3 and DynamoDB.

aws All AWS questions Roadmap: AWS core services

More on VPC and Networking