Using Existing Public IP Assigned to EC2 as Elastic IP

0

Hi all

I have got a EC2 instance and a public IP.

I would like to use this public IP (existing one) as an "elastic" IP.

Is this possible? I have got a few elastic IP created but I prefer using the existing IP assigned to my EC2 instance as "elastic" IP instead of assign a new IP to my EC2 instance.

Note: I have assigned this public IP (that was assigned to my existing EC2 instance) to DNS hostname e.g. abc.mycompany.com and we are providing 24x7 service at the moment.

If possible, we do not want to interrupt existing service by changing a new public IP, reassign it to DNS host and wait for the DNS to propagate etc.

Thanks.

Regards Ken

  • Where us your DNS record stored are you able to control the DNS TTL?

Ken
已提問 6 個月前檢視次數 258 次
2 個答案
1

Unfortunately, it is not possible - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html#concepts-public-addresses

A public IP address is assigned to your instance from Amazon's pool of public IPv4 addresses, and is not associated with your AWS account. When a public IP address is disassociated from your instance, it is released back into the public IPv4 address pool, and you cannot reuse it.

If you require a persistent public IP address that can be associated to and from instances as you require, use an Elastic IP address instead.

AWS
Oli
已回答 6 個月前
profile pictureAWS
專家
已審閱 6 個月前
0

Unfortunately, it is not possible to convert a existing public IP to elastic IP. The reason is that both the public and elastic IP use different IP address pool.

Hence, if an elastic IP is required, it can be associated to the instance post which the existing public IP will be released back to the pool.

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

AWS
支援工程師
已回答 6 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南