amazon-web-servicesamazon-ec2amazon-ecsamazon-elb

Do AWS public facing Load Balancer IPs change?


I am creating a backend with ECS and I need to have a static IP, for what I understand from the AWS console all internet-facing load balancers are assigned an IP address by AWS, my question is: Will that IP address change? And if I have 2 Availability Zones, both have different IPs?

For internet-facing load balancers, the IPv4 addresses of the nodes are assigned by AWS.
For internal load balancers, the IPv4 addresses are assigned from the subnet CIDR.

enter image description here


Solution

  • Yes, the IPs change sporadically and you're correct that the IP is different in each Availability Zone.

    If you need to have static IPs, you could consider fronting an Application Load Balancer with a Network Load Balancer. This would allow an elastic IP to be set for each AZ that the NLB resides and you should still get the benefits of the ALB.

    The downsides would be extra cost and latency. I haven't tried this myself so can't vouch for how well it works.

    Source: https://aws.amazon.com/blogs/networking-and-content-delivery/application-load-balancer-type-target-group-for-network-load-balancer/