Private vs Public Subnets

Let's see the practical difference between a server in a public subnet versus one in a private subnet.

We'll create two servers, one in each subnet type.

  1. The server in the public subnet gets assigned a public IP address. The public internet can reach it, and it can reach the public internet.
  2. The server in the private subnet does not get a public IP and is not accessible from the outside internet (but it can reach the internet through the NAT Gateway).

We also SSH into the "public" server, which then allows us to SSH into the "private" server - we use the public server as a bastion (jump) host to gain access to the private network.

Don't miss out

Sign up to learn when new content is released! Courses are in production now.