Cloud security Public and private subnets 3 min read

What makes a subnet public or private?

An EC2 instance is in a subnet named private-apps. Is it actually private?

  1. The route table defines the subnet type

    In AWS, a subnet associated with a route table that sends internet-bound traffic to an internet gateway is public. Without that route, it is private by this definition—even if someone gave it a reassuring name.

    The route table for a public subnet has a route to an internet gateway. Public subnetRoute tableInternet GW

    In short Look at the route table, not the subnet label.

  2. Internet reachability needs more than a route

    For internet traffic to reach an IPv4 instance through an internet gateway, the instance also needs a public IPv4 address or Elastic IP. Security groups and network ACLs must permit the traffic too.

    In short Route, address, and network rules combine to determine reachability.

  3. Private workloads can use controlled outbound paths

    A private subnet can send outbound traffic through a NAT device or a service endpoint without accepting unsolicited internet connections through an internet gateway. Choose the path the application actually needs.

    In short Outbound access does not automatically mean inbound reachability.

What a private subnet doesn’t guarantee

“Private” does not mean isolated from every network. Peering, VPNs, transit gateways, NAT, and service endpoints create other paths that need review.

This definition describes AWS VPC routing. Other platforms use different network constructs.

Keep this

Check routes, addresses, and firewall rules together.

Do not infer exposure from a subnet label. Inspect its route table, resource addresses, security groups, and network ACLs.
Route
A route to an internet gateway makes the subnet public.
Address
Public reachability requires an address routable from the internet.
Filter
Security groups and network ACLs still control traffic.

Sources

Last reviewed 20 November 2026.

Next byte · Cloud data protection Is this S3 bucket public?