Reputation: 431
While learning basic terminology of AWS I've been came across with Elastic IP. However, I don't entirely understand the definition of Elastic IP from the official docs.
So, I'm actually looking for a simple explanation of Elastic IP and its usefulnesses over the pubic IP of an instance.
Upvotes: 43
Views: 30306
Reputation: 2139
Elastic IP address is a public static IPv4 address which is reachable from the Internet. Basically Elastic IP addresses are used by AWS to manage its dynamic cloud computing services. Within the AWS infrastructure, customers have virtual private clouds (VPC), within the VPCs, users have instances. So when you launch an EC2 instance, you receive a Public IP address by which that instance is reachable from internet. Once you stop that instance and restart the instance you get a new Public IP for the same instance. So it's basically a problem to connect your instance from internet for not having a static IP. To overcome this problem, we attach an Elastic IP to an Instance which doesn't change after you stop / start the instance.
In short Elastic IP is a permanent IP for your instance.
Hope it help you to understand the basics of Elastic IP. For more please look at Elastic IP, Static IP, Public IP. What’s the Difference?.
Upvotes: 84
Reputation: 338
As others have mentioned it's useful since you get a static public IP address. Thus if you regularly SSH into an instance it's better to have a fixed consistent IP address. If you don't use Elastic IP the public IP address will change every time your EC2 stops and starts again. One other point worth noting is that Elastic IP is free if you use it, however, if you avail of it and then stop using it you will be charged since AWS want to discourage people from holding onto Elastic IPs that aren't in use. You need to make sure to release it if you stop using it.
https://aws.amazon.com/premiumsupport/knowledge-center/elastic-ip-charges/
Upvotes: 6
Reputation: 12741
An Elastic IP address is a static (doesn't change) IPv4 address associated with your AWS account. It is also public, meaning the IP address is uniquely reachable across the internet in the same kind of way that a postal address is uniquely reachable by the postal service.
When deciding if an Elastic IP address is needed, that question becomes am I OK with just a public IP address, which is subject to change, or do I need my IP address to also be static? A static IP address is useful in many situations such as DNS configurations, load balancing, failover, etc.
Upvotes: 4