Elastic IP vs auto-assigned public IP?
BeginnerConceptVPC and Networking
Answer
An auto-assigned public IPv4 is released when the instance stops and changes on restart. An Elastic IP is a static address you own until released, and can be remapped between instances or ENIs for failover. Since February 2024 AWS charges for every public IPv4 address, in use or not, so idle EIPs cost money.
Prefer load balancers and DNS names over EIPs; use EIPs for NAT gateways and allowlisted egress.
More on VPC and Networking
What is a VPC and what are the CIDR constraints?BeginnerWhat makes a subnet public or private?BeginnerHow do route tables work, including the local route and longest-prefix match?IntermediateInternet Gateway vs NAT Gateway: what does each do?BeginnerNAT Gateway vs NAT instance?IntermediateSecurity group vs network ACL: compare them.Beginner