We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
System Design Masterclass · Cloud Infrastructure
Free preview: the first 2 parts of this 6-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design coursein Cloud Infrastructure
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
It is easy and good
“It is really nice and good Please join the course”
When you launch an EC2 instance with a public IP, AWS assigns one from its pool. Stop the instance, start it again, you get a different IP. Your records now point nowhere. External services that whitelisted your old IP can no longer reach you. Monitoring dashboards break. Firewall rules on partner systems become invalid.
An Elastic IP fixes this. It's a public IPv4 address that belongs to your account, not to any specific instance. You can attach it to an instance, detach it, and reattach it to a different instance, all within seconds. The IP never changes until you explicitly release it.
This matters most for failover. If your primary server dies, you point the Elastic IP at a standby server. External clients see zero change. No DNS propagation delays. No stale caches. The cutover happens in under a minute.
What you get: A static IPv4 address from AWS's pool, allocated to your account.
What you can do with it:
Cost model (the gotcha):
| State | Cost |
|---|---|
| Associated with a running instance | Free |
| Allocated but NOT associated | ~$3.65/month |
| Associated with a stopped instance | ~$3.65/month |
AWS charges for idle Elastic IPs to discourage hoarding. IPv4 addresses are a scarce resource, there are only 4.3 billion total, and cloud providers are running low. In 2024, AWS started charging $0.005/hr for all public IPv4 addresses, including those on running instances.
Limits: 5 Elastic IPs per region by default. You can request more, but AWS wants you to use them sparingly.