Public vs. Private IP Addressing
In AWS EC2, instances utilize two types of IP addresses to facilitate communication. Private IP addresses are primary for internal communication within your VPC, while Public IP addresses allow instances to communicate with the internet.
Private IP: Assigned from the VPC subnet range; primary address for communication between instances in the same or peered VPCs.
Public IP: Maps to the instance's private IP via NAT; used for inbound/outbound communication with the internet.
Persistence: Public IPs assigned at launch are released when the instance is stopped; Private IPs persist for the lifetime of the network interface.