AWSOfficial AWS Partnerโ€ขCloud-powered training & certificationsExplore Courses
AWSOfficial AWS Partnerโ€ขCloud-powered training & certificationsExplore Courses
AWSOfficial AWS Partnerโ€ขCloud-powered training & certificationsExplore Courses
AWSOfficial AWS Partnerโ€ขCloud-powered training & certificationsExplore Courses

Elastic IP Explained: Complete Guide to Static Public IP Addresses in AWS

6/12/2026

AWS

When you launch an Amazon EC2 instance, AWS typically assigns a public IP address that allows users to access the server over the internet.

However, there is an important limitation:

If the instance is stopped and started again, the public IP address may change.

For personal projects, this may not be a major issue. But for production applications, websites, APIs, remote access systems, and business-critical services, changing IP addresses can create significant operational problems.

To solve this challenge, AWS provides Elastic IP Addresses (EIPs).

Elastic IPs allow you to reserve a static public IPv4 address and associate it with AWS resources. This ensures your applications remain reachable using the same IP address even when underlying infrastructure changes.

In this guide, you'll learn:

  • What Elastic IPs are
  • Why they are needed
  • How they work
  • Benefits and limitations
  • Use cases
  • Best practices
  • Cost considerations
  • Interview questions

What Is an Elastic IP Address?

An Elastic IP Address (EIP) is a static public IPv4 address provided by AWS.

Unlike automatically assigned public IP addresses, an Elastic IP remains allocated to your AWS account until you release it.

Key characteristics:

  • Static
  • Publicly routable
  • Account-owned
  • Reassignable

This means you can move an Elastic IP between AWS resources without changing the address visible to users.

Why Elastic IPs Exist

Let's consider a typical scenario.

You launch an EC2 instance:

Public IP: 54.201.10.20

Users begin accessing your application.

Later:

  • You stop the instance
  • You start it again

AWS may assign:

Public IP: 18.232.45.12

Now:

  • DNS records may break
  • Firewalls may require updates
  • Clients may lose connectivity

Elastic IPs solve this issue by providing a permanent public IP address.

Public IP vs Elastic IP

FeaturePublic IPElastic IP
Automatically AssignedYesNo
StaticNoYes
Changes After Stop/StartUsually YesNo
Reserved for AccountNoYes
TransferableNoYes

This distinction is crucial when designing production systems.

How Elastic IPs Work

An Elastic IP belongs to your AWS account rather than to a specific EC2 instance.

Workflow:

Step 1

Allocate Elastic IP.

Example:

44.204.120.15

Step 2

Associate it with an EC2 instance.

Step 3

Traffic flows through the Elastic IP.

Step 4

If the instance fails:

  • Launch replacement instance
  • Reassociate Elastic IP

Users continue using the same address.

No DNS changes required.

Real-World Analogy

Imagine a company office.

Public IP

Like renting a temporary phone number.

If you move offices:

  • Number changes.

Elastic IP

Like owning a permanent business phone number.

Even if you move locations:

  • Customers still call the same number.

Elastic IPs provide that same consistency for internet connectivity.

Elastic IP Architecture

Without Elastic IP:

Users
โ†“
EC2 Instance
โ†“
Dynamic Public IP

After restart:

New Public IP

Applications may become unreachable.

With Elastic IP:

Users
โ†“
Elastic IP
โ†“
EC2 Instance

Even if the backend server changes:

Users
โ†“
Same Elastic IP
โ†“
New EC2 Instance

Users notice no IP change.

Allocating an Elastic IP

AWS makes allocation simple.

Step 1

Open EC2 Dashboard.

Step 2

Navigate to:

Network & Security

Step 3

Select:

Elastic IPs

Step 4

Click:

Allocate Elastic IP Address

Step 5

AWS reserves a public IPv4 address.

Example:

3.111.45.210

The address now belongs to your AWS account.

Associating an Elastic IP

Once allocated:

Step 1

Select Elastic IP.

Step 2

Choose:

Associate Elastic IP Address

Step 3

Select target EC2 instance.

Step 4

Save configuration.

The instance now uses the Elastic IP.

Reassociating an Elastic IP

One of the biggest advantages of EIPs is rapid failover.

Suppose:

Original Server

EC2-A

fails.

Launch:

EC2-B

Move Elastic IP:

44.204.120.15

from EC2-A to EC2-B.

Users continue accessing the same address.

This improves availability and disaster recovery.

Common Use Cases

Web Servers

Provide a stable public endpoint.

Application Servers

Allow predictable connectivity.

Remote Administration

Enable administrators to connect using a fixed IP.

DNS Mapping

Domain names can point to a permanent IP address.

Disaster Recovery

Quickly redirect traffic to replacement infrastructure.

Firewall Whitelisting

External systems often require fixed source IPs.

Elastic IPs make this possible.

Elastic IP and DNS

Suppose you own:

www.example.com

DNS record:

www.example.com โ†’ 44.204.120.15

If your instance changes:

  • DNS remains unchanged
  • Elastic IP remains unchanged
  • Application remains accessible

This simplifies infrastructure management.

Elastic IP and High Availability

Elastic IPs can improve recovery speed but are not a complete high-availability solution.

For example:

Single Server + Elastic IP

Still has a single point of failure.

If the server crashes:

  • Application becomes unavailable

until failover occurs.

For true high availability, AWS recommends:

  • Load Balancers
  • Auto Scaling
  • Multi-AZ deployments

Elastic IP vs Load Balancer

Beginners often confuse these services.

Elastic IP

Provides:

  • Single static IP

Suitable for:

  • Small deployments
  • Administration access

Load Balancer

Provides:

  • Traffic distribution
  • High availability
  • Scalability

Suitable for:

  • Production applications
FeatureElastic IPLoad Balancer
Static IPYesIndirectly
Load DistributionNoYes
High AvailabilityLimitedHigh
ScalabilityLimitedExcellent

Elastic IP Limits

AWS places limits on Elastic IP allocations.

Reasons:

  • IPv4 scarcity
  • Resource conservation

Most accounts start with a small allocation limit.

Additional addresses may require approval.

Always verify current AWS service quotas.

Cost Considerations

Historically, Elastic IPs were free while actively associated with running resources.

However, AWS pricing policies evolve over time.

Important:

Always verify current pricing using official AWS documentation before production planning.

Typical cost factors include:

  • Unused Elastic IPs
  • Excess allocations
  • IPv4 address usage policies

Unused EIPs should be released when no longer needed.

Best Practices

Use Elastic IPs Only When Necessary

Not every EC2 instance needs one.

Release Unused Elastic IPs

Avoid unnecessary costs.

Use DNS Names

Applications should generally connect through domain names rather than raw IP addresses.

Combine With Route 53

Provides better flexibility and management.

Plan for High Availability

Elastic IPs are not substitutes for proper architecture.

Common Beginner Mistakes

Allocating But Not Associating

Reserved addresses may still incur charges.

Using Elastic IPs Everywhere

Many workloads work perfectly with DNS.

Forgetting to Release Unused EIPs

Can increase costs.

Assuming EIP Provides High Availability

It does not automatically create redundancy.

Hardcoding IP Addresses

DNS provides greater flexibility.

Real-World Example

Imagine a company hosts an API server.

Current configuration:

api.company.com

points to:

44.204.120.15

This Elastic IP is attached to:

EC2-A

If EC2-A fails:

  1. Launch EC2-B.
  2. Reassociate Elastic IP.
  3. API remains reachable.

Customers continue using:

api.company.com

without noticing infrastructure changes.

Elastic IP Workflow Summary

Allocate

Reserve static IPv4 address.

Associate

Attach to EC2 instance.

Use

Accept internet traffic.

Reassociate

Move between resources if necessary.

Release

Return unused address to AWS.

Interview Questions

What is an Elastic IP?

A static public IPv4 address allocated to an AWS account.

Why use an Elastic IP?

To provide a permanent public address for AWS resources.

Does an Elastic IP change after instance restart?

No.

Can an Elastic IP be moved to another instance?

Yes.

Is an Elastic IP automatically assigned?

No. It must be allocated manually.

Does an Elastic IP provide load balancing?

No.

Does an Elastic IP guarantee high availability?

No. Additional architecture components are required.

Conclusion

Elastic IP Addresses solve one of the most common challenges in cloud computing: maintaining a consistent public IP address despite infrastructure changes.

By providing static, reassignable IPv4 addresses, Elastic IPs make it easier to manage DNS records, support disaster recovery strategies, enable firewall whitelisting, and maintain reliable connectivity for applications and administrators.

However, Elastic IPs should be used thoughtfully. Modern cloud architectures often combine Elastic IPs with services such as Route 53, Load Balancers, Auto Scaling Groups, and multi-AZ deployments to achieve true scalability and high availability.

With this article, you've completed Week 2 of the AWS learning journey and now have practical knowledge of launching EC2 instances, working with AMIs, configuring Security Groups, managing Key Pairs, and using Elastic IPs effectively.