Way to redirect an IP to another IP on Amazon EC2

amazon ec2apache-2.2domain-name-systemhaproxyload balancing

We're migrating our deployment from regular EC2 into a VPC, we have two load balancers in the public cloud that we have a number of domain "A" records pointed at, however I didn't realize that a public Elastic IP could not be attached to a VPC instance, you must use VPC based Elastic IP's.

So you're aware, our LB's are HAProxy based instances, NOT Elastic Load Balancers. So we've got Apache to work with here if that helps answer my question or offers an alternative.

Because not all of the domains in question pointing at the public LB's are under my control, it's very difficult to schedule the change to DNS with everyone, lets call it impossible.

So my question is, is it possible that I can redirect calls to our public LB's to their replacements in the VPC? This would have to be transparent while we go through our clients and have them update their DNS.

Any suggestions would be greatly appreciated!


EDIT: To expand just a little, it would be a benefit if I could do this simply using EC2 features so I don't have to keep the two public LB instances running. Failing that, I need to know specifically how to accomplish the "redirect", is it done in DNS, or is it done somewhere else?


EDIT 2: Nobody was able to offer any insights into an Amazon specific resolution that didn't require the LB instances to remain up, so I've outlined what we did with HAProxy in the selected answer below.

Best Answer

You could redirect requests to your regular EC2 load balancers to your VPC load balancers. That's an extra hop for everyone who hasn't updated their DNS, but it's only temporary and good motivation for your clients to update ASAP.

Related Topic