Any EC2 running on a private subnet can be accessed from another EC2 instance from within VPC network or over a VPN network. The instances running are not accessible via the public internet. Each VPC has a default internet gateway associated with it. A new subnet is always created as a public subnet. The public subnet can be changed to a private subnet by assigning its route table to a private route table:
- The first step is to create a private route table:
- From the VPC dashboard, navigate to Route Tables and click on the Create Route Table button:
-
- In the Create Route Table popup, assign the name of the route table in ...