1

I have a server that is up and running with an auto-assigned public IP address. This IP address was not created with Elastic IP. Is there anyway to transfer this IP address onto a new instance in my account?

Lloyd Banks
  • 35,740
  • 58
  • 156
  • 248

3 Answers3

4

I'm afraid you can't.

The auto assigned public IPs are not yours to deassociate and reassociate.

You can't tell them "I changed my mind, I want to use this IP as if it was an Elastic IP". It doesn't work like that. You can't really pick your elastic IP. You just ask for one, and then operate with whatever IP they gave you.

ffflabs
  • 17,166
  • 5
  • 51
  • 77
2

You cannot manually associate or disassociate a non-elastic IP address from your instance. Instead, in certain cases, aws release the public IP address from your instance, or assign it a new one for below cases: 1. They release the public IP address for your instance when it's stopped or terminated. Your stopped instance receives a new public IP address when it's restarted.

  1. They release the public IP address for your instance when you associate an Elastic IP address (EIP) with your instance, or when you associate an EIP with the primary network interface (eth0) of your instance in a VPC. When you disassociate the EIP from your instance, it receives a new public IP address.

  2. If the public IP address of your instance in a VPC has been released, it will not receive a new one if there is more than one network interface attached to your instance.

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html#concepts-public-addresses

If you require a persistent public IP address that can be associated to and from instances as you require, use an Elastic IP address (EIP) instead. You can allocate your own EIP, and associate it to your instance. For more information, please see Elastic IP Addresses (EIP).

Tapaswi Panda
  • 1,041
  • 7
  • 13
-1

Easy, setup a HTTP or TCP transparant proxy, with HAProxy or Nginx.

Thomas Decaux
  • 21,738
  • 2
  • 113
  • 124