PureDevOps Community

AWS - Public Subnet vs Private Subnet

what is the difference between public and private subnet? In which scenario we use the subnets?

1 Like

Hi Samaya,

Public Subnet has Internet Gateway and Private subnet has NAT gateway.

The instances in the public subnet can send outbound traffic directly to the Internet, the instances in the private subnet can access the Internet by using NAT gateway.

Web servers in a public subnet and the database servers in a private subnet.
In other words, Public-facing web application in a Public subnet and back-end application / db servers that aren’t publicly accessible in a private subnet.


1 Like