Tuesday, 25 May 2021

Difference between Public & Private Subnet

PUBLIC & PRIVATE SUBNET IN AMAZON  VIRTUAL PRIVATE CLOUD

This post explains the difference between public and private subnet in Amazon (AWS) Virtual Private Cloud with a simple yet detailed explanation.

The main difference between public and private subnet is how they can access the internet and who can access the instance in that subnet.


We can access the internet only if we have a public IP address.

Public subnet will have the public IP address which will route to an internet gateway.

Private subnet will not have any public IP address, so this kind of traffic will be directed to NAT ( Network Address Translator) which provides the IP address to access the internet via an internet network gateway.
And public subnet has both in and out internet access while from private subnet only has out internet access i.e. no one can access the instance in the private subnet from the internet.

1 comment: