Pointing AWS EC2 elastic IP to instance in VPC

amazon-elastic-ipamazon-web-services

I've had an Elastic IP pointing to a classic EC2 instance for several years. I've now stared a new instance – inside a VPC – and want to use that instance for my website. Therefore I want to point my 'old' elastic IP to the new instance. Apparently that's not possible.

I need to keep my website on the original IP address. Is there another way to use an instance in a VPC, and point the original elastic IP to that?

Best Answer

It is not possible (even for the AWS support afaik) to use Elastic IPs which are not for VPCs with VPC instances. So you're stuck here - the only possible way to do things like this is not to rely on a fixed IP address (you will get the same problem if you try to use ELBs or more than one instance).

Your customers should NOT point to an IP address but they should use CNAME records with the given subdomain you provide for them. With that architecture you're able to migrate the whole domain with all subdomains to a new IP address if you need to and with the CNAME records nothing changes on the customer side (as the subdomain they're pointing to has the new IP address).

The only solution for you now would be to send out an email to all customers which use the IP in their DNS records to change it to a CNAME and after migrating all customers to CNAME you can switch to the new Elastic IP and change your own DNS records.

UPDATE: As pointed out below it is now possible to move an Elastic IP from "classic" to "VPC" - you will find the details here: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#using-eip-migration

Related Topic