1

I currently have an ec2 "t2.nano" instance up and running. I would like to switch to a "t2.micro". In order to do that, I need to stop the instance. But I would lose my IPv4 address in the process. And I do not want that (because I have several ssh tunnels up and running from rasps in the wild that are currently hard coded to connect to this IPv4 address).

I decided to create an Elastic IP address. But I understand that by creating an Elastic IP address and assigning it to my current ec2 instance, I would lose my current IPv4 address too.

Is it possible to create an Elastic IP address from the current IPv4 address of my ec2 instance? If so, how can I do this operation?

1 Answer 1

5

Looking into the AWS documentation here

it clearly states that its not possible.

"When you associate an Elastic IP address with an instance or its primary network interface, the instance's public IPv4 address (if it had one) is released back into Amazon's pool of public IPv4 addresses. You cannot reuse a public IPv4 address, and you cannot convert a public IPv4 address to an Elastic IP address. For more information, see Public IPv4 addresses and external DNS hostnames."

The approach i would take, since you will need to change the hardcoded endpoint, is to create a FQDN for the new IP. In the future if you need to change again you'd only need to change the DNS configuration for the FQDN.

2
  • Ok, yes. That was my second plan ahah. I don't understand why it's not possible to reuse the current IPv4 address since I already use it for my instance and in my mind it does not change anything if I transfer it to my "owned" IPs and use it from there.
    – vvvvv
    Dec 2, 2020 at 17:36
  • 1
    usually it has to do with IP pools reserved for being dynamically assigned and other pools for static assigned IP's.
    – BANJOSA
    Dec 2, 2020 at 17:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .