VPC is something you should know in-depth for AWS Certified Solution Architect Associate Exam & AWS Certified SysOps Exams.
At the poit of AWS Certified cloud practitioner level, you should know about:
- VPC, Subnet, Internet Gateways, NAT Gateways
- Security Groups, Network Gateways, VPC Flow Logs,
- VPC Peering & VPC Endpoints
- Site to Site VPN & Direct Connect
- Transit Gateways.
which will be covered in this blogpost.
IPv4 - Internet Protocol Version 4 (Has 4.3 Billion Addresses)
- Public IPv4 - can be used on the Internet.
- EC2 instance gets a new PublicIP every time you stop and start it (default behaviour)
- Private IPv4 - can be used on private network(LAN) such as internal AWS Server/Networking.
- Private IPv4 is fixed for EC2 instance even if you start or stop them.
IPv6 - Internet Protocol Version 6 (Has 3.4 x 1038 Addresses)
It allows you to attach a fixed public IPv4 address to an EC2 instance.
Note: It has ongoing cost if not attached to EC2 instance or if the EC2 instance is stopped!
VPC = Virtual Private Cloud
Private Network to deploy your resources (regional AWS Service)

Subnet
Allows you to partition of your network inside your VPC (AZ Resources)
There are 2 types of subnets:
Public Subnet =
It is a subnet that is accessible from the internet
Private Subnet =
It is a subnet that is not accessible from the internet
To define access to the internet and between subnets we use route table.
Internet Gateway & NAT Gateway
- Internet Gateway helps our VPC instance connect with the Internet.
- Public Subnet have a route to internet gateway.
- NAT gateways (AWS Managed) & NAT Instances (Self Managed) allow your instances in your private subnet to access internet while remaining private.