How to create a no-internet access (private) subnet?


Points of My Scenario:

  1. I tried to create 3 private subnets (subnets without an internet gateway) so that EC2 instances would be unable to access Internet
  2. I used the procedure in AWS document
  3. Upon completion, I checked the route table for each subnet...
  4. Alas! Each one had destination associated with the default igw-<GUID>: just like the other system-generated subnets.

Question: why is this happening and how can I create truly private subnets?

asked 15 days ago20 views
1 Answer
Accepted Answer

In your VPC is a default route table. The instructions on that page don't mention it but if you don't assign a specific route table to a subnet the default is used. In your case, the default route table has a route to the Internet Gateway.

To fix this, create a new route table in your VPC and assign it to the private subnets.

profile picture
answered 15 days ago
profile picture
reviewed 15 days ago
  • OMG! That's it! That works! A bundle of thanks, Brettski-AWS!

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions