Public IPs, Private IPs, and Elastic IPs

~10 min read

Three different IP addresses an instance might have, and why they behave differently across a stop/start cycle.

Public IPs, Private IPs, and Elastic IPs is a Pro topic

Sign in, then upgrade to Pro or Power to unlock this topic and the full AWS curriculum.

Key points

  • Private IP: stable within the VPC for the instance's life, used for internal communication
  • Auto-assigned Public IP: changes on every stop/start — never hardcode or point DNS at this
  • Elastic IP: static, persists across stop/start, can be moved between instances, but costs money while unattached
  • For anything needing a stable public address (e.g. a DNS A record), use an Elastic IP, not the auto-assigned public IP