AWS Public IP vs Elastic IP

The key difference is the Elastic IP does NOT change if you terminate or restart an instance. Think of it as a static IP Assigned for that EC2 instance permanently. You want this one if you are hosting a service/app/site publicly. This way, you don’t run into an issue with the IP Address changing and your DNS breaking.

Public IP
It is assigned to your launched instance.
When an instance is terminated the public IP attached to it gets released and further when you relaunch the same instance new IP address is assigned.

Elastic IP
It is assigned to your AWS account.
Elastic IP do not change and they remain same even if you terminate the instance and later again restart the same instance.

 

 

Below is from AWS:

Issue
I want to have a public IP address for my EC2 instance that will persist even if my instance is stopped and restarted. How do I do that?

Resolution
An Elastic IP address is a reserved public IP address that you can assign to any EC2 instance in a particular region, until you choose to release it. To allocate an Elastic IP address to your account in a particular region, see Allocating an Elastic IP Address.

When you associate an Elastic IP address with an EC2 instance, it replaces the default public IP address. If an external hostname was allocated to the instance from your launch settings, it will also replace this hostname; otherwise, it will create one for the instance. The Elastic IP address remains in place through events that normally cause the address to change, such as stopping or restarting the instance.