Published December 30, 2017 by

Working with Elastic IP Address in AWS

What is Elastic IP:

When you launch an EC2 instance, you receive a Public IP address by which that instance is reachable. Once you stop that instance and restart you get a new Public IP for the same instances.

So, Public IP get's changed every time for an instance after stop/start.

To overcome this problem, we attach an Elastic IP to an Instance which doesn't change after you stop/start the instance as many times.

Give Elastic IP to Instance:

Login to AWS Account and go to EC2 Dashboard and click Elastic IPs



Click on Allocate new address



Click on Allocate



Click on Close


Now AWS provide you one Elastic IP, go to Elastic IP section in EC2. Here you shaw Elastic IP which AWS provide you.


Now I go for attached this Elastic IP to my instance.

Select Elastic IP and click on Actions button, and go to Associate address 


Here you choose which instances, you want to give this Elastic IP. and click Associate Button. and Close Button.



Please note If you associate an Elastic IP address with your instance, your current public IP address is released.

Now you can verify your server have Elastic IP.



Now in future, you stop/start your instance but your IP never changes.

Please note AWS never charge for Elastic IP on running instance but charged on $0.005 per Elastic IP address not attached to a running instance per hour.



Remove Elastic IP to Instance:

Go to Elastic IP and click on Actions button, and go to Diassociate address.





Go to Elastic IP and click on Actions button, and go to Release addresses, and click on Release Button.