Private Subnet vs. Public Subnet

Before we dive into details, I would like to talk a bit about the limitations in today's world.
In real world, "public vs. private" runs into three main constrains: IP scope, limited address pools, and segmentation.
First, IPv4 is scarce and everyone reuses the same RFC1918 blocks (10/8, 172.16/12, 192.168/16).
The catch I’ve seen on client projects: the moment you need VPC peering, a Transit Gateway, or a partner VPN, CIDRs overlap, routing breaks, and you’re choosing between NAT band-aids or painful renumbering.
Secondly, every subnet has a limited number of IP addresses. They can be consumed really fast when you scale out, in blue / green environments, or add a new AZ. What helped me is treating IPs like a capacity metric: track them, alert early, and allocate with them wisely. AWS recommends using VPC IP Address Manager (IPAM) to plan, track, monitor IP addresses for your AWS workloads.
Third, network segmentation isolates parts of the network and help you protect sensitive assets, where data resides. From my perspective, this is the most underestimated part of the configuration. While it reduces the attack surface and limits lateral movement, it must be carefully planned (tiered subnets, strict security groups, governed egress) to make it harder for an attacker to move freely through the environment.
A subnet is a logical separation of IP addresses in your VPC, where you can deploy resources
In real world, "public vs. private" runs into three main constrains: IP scope, limited address pools, and segmentation.
First, IPv4 is scarce and everyone reuses the same RFC1918 blocks (10/8, 172.16/12, 192.168/16).
The catch I’ve seen on client projects: the moment you need VPC peering, a Transit Gateway, or a partner VPN, CIDRs overlap, routing breaks, and you’re choosing between NAT band-aids or painful renumbering.
Secondly, every subnet has a limited number of IP addresses. They can be consumed really fast when you scale out, in blue / green environments, or add a new AZ. What helped me is treating IPs like a capacity metric: track them, alert early, and allocate with them wisely. AWS recommends using VPC IP Address Manager (IPAM) to plan, track, monitor IP addresses for your AWS workloads.
Third, network segmentation isolates parts of the network and help you protect sensitive assets, where data resides. From my perspective, this is the most underestimated part of the configuration. While it reduces the attack surface and limits lateral movement, it must be carefully planned (tiered subnets, strict security groups, governed egress) to make it harder for an attacker to move freely through the environment.
A subnet is a logical separation of IP addresses in your VPC, where you can deploy resources
such as EC2, ECS, Lambda, RDS.
A key difference between them is access to the Internet.
• A public subnet has access to the Internet through an Internet Gateway and is
associated with a public routing table.
Public subnets are typically used for resources that need direct access to the Internet, such as
Load Balancers, Ingress Controllers, NAT Gateways, proxies or host bastions.
• A private subnet, on the other hand, it does not have direct Internet access, and it is
associated with a private route table.
Private subnets host internal services, databases, EC2 instances, EKS pods.
A non-negotiable detail is that each subnet lives entirely within a single Availability Zone and never spans AZs. In practice, high availability means creating one subnet per AZ for each tier, placing resources across them, and using per-AZ components (NAT, load balancers) to avoid cross-AZ dependencies.
A non-negotiable detail is that each subnet lives entirely within a single Availability Zone and never spans AZs. In practice, high availability means creating one subnet per AZ for each tier, placing resources across them, and using per-AZ components (NAT, load balancers) to avoid cross-AZ dependencies.
From a security perspective, public subnets are more exposed to external threats due to their
internet connectivity. If resources are deployed in public subnet with an Elastic IP, they are
publicly reachable even though security groups are configured.
In contrast, resources in private subnets are more protected, and the malicious attacker should
bypass other security layers to get to the private resources.