An Elastic IP is a reserved public IP address, which you can use to any instance on AWS until you released it. In this article, I will explain what is Elastic IP and Its Pricing, how to assign Elastic IP address to the instance, how to detach Elastic IP address from the instance.
Elastic IP’s or Static IP’s are reserved public IP addresses. In AWS, as long as Elastic IP’s are attached to any EC2 instance, it charges nothing. But, remember to release Elastic IP, if you terminate any instance on AWS, where Elastic IP was attached. AWS allow us to use upto 5 Elastic IP Addresses for free.
You can associate or disassociate Elastic IP’s anytime. However, it is not guaranteed to recover Elastic IP after release. You may recover Elastic IP, if it was not taken by any other AWS account.
What is Elastic IP and Its Pricing
Elastic IP and its pricing
An Elastic IP is free if it is in the use state. When you terminate your EC2 instance, Elastic IP automatically detached. But in detach state, it is billable.
An Elastic IP is free for the following conditions.
- The Elastic IP address attached with the EC2 instance.
- The instance associated with the Elastic IP address is running.
- The instance has only one Elastic IP address attached to it.
- The Elastic IP address is associated with an attached network interface, such as a Network Load Balancer or NAT gateway.
Release the IP address to stop the charges if you don’t need.
How to assign Elastic IP Address to the EC2 instance
Go to EC2 dashboard and click on Elastic IPs on left sidebar.
Now, choose Amazon’s pool of IPv4 addresses and click on Allocate.
After Elastic IP allocated, you have to assign it to the EC2 instance by clicking on Action followed by Associate Elastic IP Address.
Choose an instance and click on Associate to attach.
Now, Elastic IP is successfully attached.
Release or Detach Elastic IP Address from the instance
If you want to release the IP Address. First, you have to detach the Elastic IP address. Go to Elastic IP dashboard, click on Action followed by Dissociate Elastic IP address.
A confirmation message will appear with Instance ID to make sure you choose the correct instance. Click Disassociate to release the IP Address.
After detaching, you have to click Action again. After clicking action, click release Release Elastic IP Addresses.
Now, your instance Elastic IP released.
Conclusion
By now, you have learned what is Elastic IP and how to assign or detach to the EC2 instance. If you like this article please feel free to share with your friends.
FAQs
What is the difference between Elastic IP and Public IP
Public IP is launched with EC2 instance whereas Elastic IP has to be assigned. On termination or restarting of the instance, public IP changed but Elastic IP not.
Is it possible to recover Elastic IP ?
When you release the IP address, it might be provisioned automatically by another AWS account. You might be able to recover the Elastic IP address again later, but only if no one else is using it.
How much charges for a single Elastic IP?
You’re charged by the hour for each Elastic IP address unless meet the above mentioned criteria.