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 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则