Interview Q&A / AWS & Cloud

BeginnerQuick answer1 min readUpdated 3 Oct 2026

What is an Elastic IP address and how is it different from a normal public IP on EC2?

SHORT ANSWER

A normal public IP is assigned from AWS's pool and can change when the instance is stopped and started. An Elastic IP is a static public IPv4 address you own in your account until you release it and can remap to another instance.

Explain it simply

A normal public IP is like a hotel room number you get each time you check in, which may differ next visit. An Elastic IP is your permanent home address that stays yours even if you move rooms, so friends can always find you.

Example

bash
# Allocate a static address and attach it
aws ec2 allocate-address --domain vpc
aws ec2 associate-address --instance-id i-0abc123 \
  --allocation-id eipalloc-0123abcd

# Move it to a standby instance during a failure
aws ec2 associate-address --instance-id i-0def456 \
  --allocation-id eipalloc-0123abcd --allow-reassociation

A normal auto-assigned public IP is released when the instance stops. After a restart it gets a different one. A reboot keeps it.

Since 2024 AWS charges for all public IPv4 addresses, including Elastic IPs, so do not leave unused ones lying around.

Most modern designs avoid depending on a fixed instance IP at all: use DNS names, a load balancer or a NAT gateway with an Elastic IP when a partner needs to allow-list a fixed address.

What to say in the interview

"An Elastic IP is a static public IPv4 address that belongs to my account and can be remapped between instances, while an auto-assigned public IP changes after a stop and start. I use Elastic IPs only when a fixed address is truly needed and prefer DNS or load balancers otherwise."

Common mistakes

  • Leaving unattached Elastic IPs allocated.

#aws#ec2#elastic-ip#networking

Related questions

Practise more AWS & Cloud questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open AWS & Cloud quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.