11

More of a Amazon Web Services EC2 question, hopefully not too off topic. I have a vanilla Ubuntu instance with them, and powered it off. On reboot couldn't ssh to the FQDN because the external IP address had changed.

It costs extra for a "static", or even static, IP address? I would settle for semi-permanent. Elastic sounds about right, in marketing speak.

Or, is this a security measure? I did select to have an external IP address, but it is a free account. The documentation says:

An Elastic IP address is a static IPv4 address designed for dynamic cloud computing. An Elastic IP address is associated with your AWS account. With an Elastic IP address, you can mask the failure of an instance or software by rapidly remapping the address to another instance in your account.

An Elastic IP address is a public IPv4 address, which is reachable from the Internet.

The external IP address, the one I used for ssh, is different from what I see when running ifconfig so they're using some form of NAT..as explained here:

Important

You can't manually disassociate the public IP address from your instance after launch. Instead, it's automatically released in certain cases, after which you cannot reuse it.

Even though I selected an external IP address, reboot appears (?) to be a circumstance where the IP address is released back into the pool. Please clarify that understanding.

17

The main difference between the two is that:

You will lose your Public IP when you Stop and Start the instance, while the EIP remains linked to the instance even after the Stop/Start operation (or until you don't explicitly detach it from the instance)

Concerning the costs, there's no recurring fee you will pay for the EIP usage, while you keep it attached to a running instance. Otherwise you will have to pay for the resource allocated but not used.

  • so I should point the FQDN to the EIP, and then Amazon will handle the DNS? – Thufir Jan 4 '17 at 14:44
  • 1
    Yes. AWS uses some NATs but they are transparent for you. Point the Public FQDN to the EIP. If you point it to the Public IP, when you lose it, you have to change the A record and wait for the DNS propagation time. – Echoes_86 Jan 4 '17 at 14:45
  • 1

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.