Way to limit Amazon ELB to a fixed set of IP addresses

amazon-elbamazon-vpcamazon-web-services

We would like to use Amazon Elastic Load Balancing, however, our application requires a fixed set of IP addresses as our clients need to know a finite list of possible destinations for specific requests.

Reading some answers around, it sounds like this is possible using Elastic Network Interfaces (ENIs) and Virtual Private Clouds (VPCs) – can anyone confirm I understand that right? That is, using a combination of ENIs and VPCs we would have a relatively short list of possible IP addresses that would be the returned by the ELB to the requesting browsing or other code?

Is it further possible to put an ELB inside a VPC, such that all requests come to the VPC gateway (single IP address) but get load balanced, including across availability zones, internal to the VPC?

Best Answer

AWS directs traffic to its ELBs via its Edge network, so the ip address that the request arrives at will depend on the ip address from where the request originated at. From that point of view, you can't reliably pin-point which ip addresses your clients requests will go to.

You can deploy internal ELBs which exist inside VPCs. These will have fixed RFC 1918 ip addresses (private ip addresses) within a subnet and will only be available inside your VPC.

I am not sure what you mean by "VPC Gateway".

VPCs have Internet Gateways (routes to the public Internet) and Customer Gateways (routes to 3rd party data centres via VPNs).

If you access an ELB in a VPC via a Customer Gateway, you can reliably predict the range of ip addresses of the ELB (particularly if you connect your ELB to a subnet that has a very small number of ip addresses). However, for this to work, your customer will have to establish a VPN to your VPC, which involves configuration work on the VPN termination equipment at your customers site.