I'm trying to add a second Network Interface to my EC2 instance to host a 3rd website on said instance (Linux, t2.micro). I only have type EC2-VPC available. From the EC2 Dashboard, I choose Actions -> Networking -> Attach Network Interface. It gives me the following warning:

If you attach another network interface to your instance, your current public IP address is released when you restart your instance.

Does that do exactly what it sounds like? I don't plan on rebooting the instance, but if I do, do I just have to re-associate my Elastic IPs with the Public ones for the existing two domains to be available?

  • Why do you think you need another IP for another website? There are reasons to need multiple IPs, but web hosting is generally not one of them. – EEAA Apr 15 '17 at 13:42
  • Also: "Does that do exactly what it sounds like?" Is easily answered on your own, in about 2 minutes by testing this exact scenario. – EEAA Apr 15 '17 at 13:45
  • I need to attach Apache to one IP for the forums (PHP) and the other IP will be handling the main site in Node. They can't both listen on port 80 on the same IP, no? And yes, while I can try it, I'd prefer to not lose connectivity if at all possible. – gaijinpunch Apr 15 '17 at 14:02
  • You can just have Apache proxy requests to node. Then you don't need to worry about multiple IPs, and Apache can handle all of your SSL termination. Also, it would cost you all of about 2 cents to fire up another instance and test this scenario. – EEAA Apr 15 '17 at 14:12
  • Or I could have node proxy requests to apache. The idea is to not do that though. When reading around in the Node community, this is the easier setup. – gaijinpunch Apr 15 '17 at 14:40

If you are using EIPs, then no, it's not what it sounds like... it's a generic warning from the console that displays even when not applicable. Your "current public IP" refers to public IP addresses auto-assigned from one of the dynamic pools, not to Elastic IP addresses.

This is similar to the warning you'll see about losing the data on your ephemeral volumes when stopping an instance... it's a message that displays even for instances with no ephemeral drives.

Also, restart != reboot. A restart is a start preceded by a stop, which is usually accompanied by an automatic move of your instance to physically different hardware within the availability zone.

Note that only one EIP is provided for each instance at no charge -- you're billed for each EIP after the first one on a given instance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.