Hello all. I am provisioning an ECS Fargate Service using AWS Load Balancer with a target group and ...
a
Hello all. I am provisioning an ECS Fargate Service using AWS Load Balancer with a target group and listener. Everything looks alright and it works fine. The challenge is getting a static (read, never changing) IP address for the setup. Every time we deploy, new task definitions are created and the IP address associated with the load balancer changes. For the purpose of whitelisting and ensuring security of services when integrating with external partners, we need the IP address to never change. How can this be achieved with this setup please. Thanks
b
If it is an Application Load Balancer then you can not have a static IP, this is an AWS limitation not Pulumi. The IP should not change on a Network Load Balancer.
a
@busy-monitor-69572 , thanks for your response. So for an existing system with an application load balancer, will I have to delete all networking resources - elastic IPs, VPCs, subnets, Nat gateways etc in order to create and start using a network load balancer?
The reason why I asked this is because I tried to provision a network load balancer and create a new elastic IP but I got this error
Copy code
aws:ec2:Eip (eip):
      error: 1 error occurred:
      	* creating EC2 EIP: AddressLimitExceeded: The maximum number of addresses has been reached.
      	status code: 400, request id: b1ba1ef2-9b5d-40cb-9cf4-d1c4c2a6f709
q
You do not have to delete the VPCs, subnets, etc. You can delete the load balancer itself
👍 1
You could also put an NLB infront of your ALB to get a static IP or use private link features: https://aws.amazon.com/blogs/networking-and-content-delivery/application-load-balancer-type-target-group-for-network-load-balancer/ But this will be twice as expensive
👍 1
b
The AddressLimitExceeded error just means you need to request an increased service quota from AWS. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#using-instance-addressing-limit
👍 1