An Elastic IP (EIP) is a public IP address that you can reserve from AWS for use within your account. Once you've created an Elastic IP, you can assign it to any instance of your choice or configure a server so that it will be assigned one of your reserved Elastic IP addresses at launch time.
NOTE: Elastic IPs are an Amazon-specific concept that's only supported on EC2.
Once you reserve an Elastic IP, nobody else can use that IP address. Remember, when an instance is launched into EC2, Amazon will randomly assign it both a public and private IP address. Amazon has a pool of public IP addresses that's been reserved for use within EC2. Therefore, when you launch an instance in EC2, it might be randomly assigned a public IP address that someone was just using to host their personal blog just a couple hours ago before they terminated their instance. So, depending on the situation you might accidentally inherit traffic from someone else or vice-versa. As a preventative measure, Amazon gives users the ability to reserve a public IP address for your use only from their pool of IP addresses.
With Elastic IPs, you can now allocate an IP address and assign it to an instance of your choice, which replaces the need for normal dynamic IP addressing in the cloud. Elastic IPs are dynamically remappable IP addresses that make it easier to manage servers and make global changes compared to static IPs on traditional hosting solutions, because each EIP can be reassigned to a different instance when needed. It's a way of ensuring that you don't 'inherit' traffic from other's servers on EC2, because you're using an IP that's specifically reserved for your usage only, as long as you keep that EIP.
So, if you set up a site and update your DNS A Records to point to your Elastic IPs, you'll never have to update those records over the lifecycle of your system because the same public IP address will be used for each iteration of that server regardless of how many times it's terminated and launched.
You can use the RightScale Dashboard to both create (reserved) Elastic IPs as well as configure servers to use them accordingly. See Create Elastic IP (EIP).
Elastic IPs are also an essential component for creating failover deployments on EC2. For more details, see Best Practices for using Elastic IPs (EIP) and Availability Zones.
Elastic IPs are also especially useful for upgrading software releases. Normally, you would have to make a change at the DNS level. Now with Elastic IPs you can make the changes directly inside the Dashboard. The first step is to launch your new instances (FE-2) with normal dynamic DNS from AWS. Once it's been fully tested and is ready to receive traffic, simply associate the Elastic IP to the new server (FE-2) that has the latest software release and in a couple of minutes, all new traffic will served from the new server (FE-2). The best part is that if you see a problem, simply switch the EIP back to the original server (FE-1). Thanks to Elastic IPs, performing regular software upgrades has never been easier!
By default, Amazon will let you reserve up to 5 EIPs per account. If you would like to reserve more than 5 EIPs, you can submit a request to Amazon at Request to Increase Elastic IP Address Limit.
Elastic IPs are totally free, as long as they are being used by an instance. However, Amazon will charge you $0.01/hr for each EIP that you reserve and do not use. You will be charged if you ever remap an EIP more than 100 times in a month.
Follow the Create an Elastic IP (EIP) tutorial.
Plan ahead. Before you delete an Elastic IP, verify that it's not in use. Check your DNS records and make sure that it does not contain the Elastic IP that you are going to delete. Remember, there is no undo button. Once it's deleted, you will no longer be able to use that specific IP address ever again.
Once you delete an Elastic IP from your account, it gets returned to Amazon's pool of IP addresses.
Follow the steps below to make sure that you take the necessary steps before deleting an Elastic IP.
Assigning an Elastic IP at launch is a unique feature of the RightScale Dashboard and is not provided by Amazon.
When you launch an instance that's configured to associate a particular Elastic IP at launch, you will notice that the specified Elastic IP that was previously highlighted with italics at the deployment level will seemingly "disappear" and change to -none-. Don't worry, this behavior is expected.
When a machine is launched in EC2 and in the "pending" state, it is randomly assigned a dynamic IP address just like any other instance that is launched that does not have an Elastic IP.
During the booting state, the Elastic IP will be associated to the new instance and the instance will wait for the EIP to settle. Once the instance reaches the operational state, it will be using the specified Elastic IP as its public IP address and will be ready to serve traffic sent to that IP address.
NOTE: The internal IP address is not affected.
© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.