Short definition
An Elastic IP address is a static public IPv4 address provided by AWS that remains assigned to your account until you release it, regardless of whether the associated instance is running or replaced.
Extended definition
By default, an AWS EC2 instance receives a new public IP address every time it is stopped and restarted. This makes DNS configuration fragile; any A record pointing to the instance breaks the moment the server reboots. An Elastic IP address solves this by giving you a persistent public IP that you own at the account level. You associate it with an instance, and it stays there until you explicitly reassign or release it. If the instance fails and you replace it, you reassociate the same Elastic IP with the new instance, and DNS continues to work without any changes.
Deep technical explanation
How allocation works: Elastic IPs are allocated from AWS’s pool of public IPv4 addresses and assigned to your AWS account in a specific region. You are charged for Elastic IPs that are allocated but not associated with a running instance. AWS incentivises efficient use of the limited IPv4 space.
Remapping for failover: Because an Elastic IP can be remapped to a different instance via API call, it enables a simple manual failover strategy: if the primary instance fails, launch a replacement and remap the Elastic IP to it. DNS requires no changes, and the propagation delay is zero.
One Elastic IP per instance limit: By default, each instance can have one Elastic IP associated with its primary network interface. Additional IPs require additional network interfaces or a limit increase request.
IPv4 scarcity costs: As of 2024, AWS charges for all Elastic IPs, including those in use, reflecting the global scarcity of public IPv4 addresses. For cost-sensitive setups, consider whether a load balancer with a stable DNS name is a better alternative.
Not a substitute for load balancing: Elastic IPs are appropriate for single-server setups or control plane machines. For production fleets serving traffic, an Application Load Balancer or Route 53 health-checked DNS is the correct tool.
Practical examples
- A control server managing an nginx fleet is assigned an Elastic IP so its SSH address never changes after a reboot
- A staging server is replaced after a disk failure; the Elastic IP is remapped to the new instance in under a minute with no DNS changes required
- A domain’s A record points to an Elastic IP, ensuring the domain resolves correctly through instance replacements and reboots
Why it matters
Operational stability depends on predictable addressing. An Elastic IP is a small but important detail that prevents a routine server reboot from breaking DNS, SSH configs, firewall rules, and anything else that references the server by IP address.