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

0

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 https://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html
  3. Upon completion, I checked the route table for each subnet...
  4. Alas! Each one had destination 0.0.0.0/0 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?

질문됨 일 년 전627회 조회
1개 답변
3
수락된 답변

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 pictureAWS
전문가
답변함 일 년 전
profile pictureAWS
전문가
검토됨 일 년 전
  • OMG! That's it! That works! A bundle of thanks, Brettski-AWS!

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠