2

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?

4
  • 1
    For what purpose do you need to use the same IP address? Maybe there's a different approach to your problem? Otherwise, you could always setup a webserver with your old IP address to redirect to the new one.
    – Edwin
    Dec 14, 2014 at 15:01
  • The website offers users to setup their own webshop running on a subdomain, but they can also use their own domain by pointing their DNS records to our IP address. I thought that by using an elastic IP I could always point the IP to any instance I liked, but that seemed more difficult because of the VPC instance...
    – Rick
    Dec 14, 2014 at 19:36
  • Have you spoken to AWS support? I suggest subscribing to their business support while you sort things out. There are some things they can do which you can't do yourself.
    – thexacre
    Dec 15, 2014 at 10:04
  • Will do that, cheers!
    – Rick
    Dec 15, 2014 at 13:41

3 Answers 3

0

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

2
0

I don't know of a way to get the same ip address on VPC. I would approach this as a policy problem.

I would change your documentation and dns records to use the new ip address and setup a webserver to do 301 redirects. On the content serving webserver, you may need to alias a temporary domain to each user's site. On the redirecting webserver, you would redirect using the temporary sub-domain to the serving webserver. For example: If the user requests http://mysite.example.com/index.html, you can redirect to http://mysite.temporarydomain.example.com/index.html. Capture logs of all users who use the redirect server, and send them a message to update their dns records to the new IP.

0

This is in fact possible. But there's no way to achieve it without a brief outage.

If you disassociate your Elastic IP from your instance, you can then move the Elastic IP to the VPC scope:

allocate classic elastic IP address to instance in VPC

It can take a few minutes to transition over unfortunately and it may look like it has disappeared for a moment (details here). Once it has moved over, you can then allocate it to your instance in VPC.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .