Updating the Elastic IP address of a Network Load Balancer

2

Hello,

I would like to replace the current Elastic IP address associated to my Network Load Balancer by an another Elastic IP address which is associated to an EC2 Instance (which will be terminated after the migration).

So I went to the Edit Subnet option, but it seems that I can't change the IPv4 address (Availability Zones is greyout). I have only one zone filled. But I can choose a new availability zone, and then select the Elastic IP Adress. But it means that I will two IP addresses attached to the NLB ?

I tried to disassociate the IP through the network interface page but I got the following error : "Failed to disassociate public IP address xx.xx.xxx.xxx from network interface eni-xxxxxxxxxxxxxx. API error: "You do not have permission to access the specified resource."

This error is probabily due to the fact the IP is currently in use. Is the only way to re create a netword load balancer ?

Any help would be appreciated :)

已提問 4 年前檢視次數 4289 次
3 個答案
1

Hello MrJibus,

I want to directly address your question about replacing the ElasticIP that you configured for the NLB. Once an NLB is created with an ElasticIP you can always add another node with an additional EIP for the purpose of resilience across zones. As mentioned before, this is covered here: https://aws.amazon.com/premiumsupport/knowledge-center/elb-attach-elastic-ip-to-public-nlb/.

This does not cover the use case that you are describing which is to replace the IP of the an existing NLB node(s). Unfortunately, once an NLB node is created, you cannot alter the ElasticIP associated with it. This is documented here:

As quoted from the documentation here: https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html:

"...When you create an internet-facing load balancer, you can optionally specify one Elastic IP address per subnet. If you do not choose one of your own Elastic IP addresses, Elastic Load Balancing provides one Elastic IP address per subnet for you. These Elastic IP addresses provide your load balancer with static IP addresses that will not change during the life of the load balancer. You can't change these Elastic IP addresses after you create the load balancer..."

As such, you are correct. You will have to create the NLB again, if you want to alter ANY existing Elastic IP assignment to ANY existing NLB nodes.

profile pictureAWS
已回答 2 年前
  • I can confirm that this is the answer. The other linked docs show how to add an Elastic IP to a new load balancer, or a new node in an existing load balancer, not replacing an associated Elastic IP in an existing load balancer. Truly a massive missed productivity feature. I have had to do it about 20 times while testing new infrastructure now.

-1

You can reference this link on how to update the Elastic IP of a NLB: https://aws.amazon.com/premiumsupport/knowledge-center/elb-attach-elastic-ip-to-public-nlb/

AWS
已回答 2 年前

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

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

回答問題指南