What makes a subnet public or private?
BeginnerConceptVPC and Networking
Answer
A subnet is public if its route table has a route 0.0.0.0/0 to an Internet Gateway (and instances have a public/Elastic IP). A private subnet has no direct IGW route; outbound internet goes via a NAT gateway in a public subnet or not at all.
A subnet lives in exactly one AZ, so each tier needs a subnet per AZ.
More on VPC and Networking
What is a VPC and what are the CIDR constraints?BeginnerHow do route tables work, including the local route and longest-prefix match?IntermediateInternet Gateway vs NAT Gateway: what does each do?BeginnerNAT Gateway vs NAT instance?IntermediateSecurity group vs network ACL: compare them.BeginnerWhat are the nuances of security group statefulness?Advanced