Hub/EC2 - Add new Elastic IP address (via AWS console)

This post is specifically how to work around the current TurnKey Hub limitation (read bug) that only allows a new elastic IP to be added to a new server (i.e. it fails if you try to add an existing elastic IP to a server, or add an elastic IP to an existing server). Having said that, as it requires usage of the AWS console, it equally applies to any EC2 instance.

To add an elastic IP, you will need to log into the AWS console and browse to the EC2 area. If it doesn't auto direct you to the "instances" page, then browse there (either via the link or the left hand menu - Instances >> Instances).

First find your server in the instance list there. Note that unlike the TurnKey Hub, the AWS console is split into regions, so you may need to change the AWS region to find your server (via the dropdown, top right corner, to the left of where your username is noted). If you only have one server, then it should be visible as soon as you are in the correct region.

Once you are sure you have selected the correct region and located your server, then browse to the "Elastic IP" page (again via the link or left hand menu - Network & Security >> Elastic IPs).

Click the orange button towards the top right labelled "Allocate Elastic IP Address". The defaults (i.e. "VPC", region you have already selected, etc) should be fine, so scroll down and click the orange "Allocate" button. That will take you back to the Elastic IP page, but now an IP address will be noted, as per the screenshot below.

elastic ip addresses - AWS EC2 console

The IP address should be a clickable text link, so click that. Then click the orange "Associate Elastic IP Address" button. In the new page that loads, click in the "Instance" box as noted in the screenshot below. This should reveal a list of all relevant servers. Select the appropriate server and scroll down to click the orange "Associate" button.

associate elastic IP - AWS EC2 console

And that's it! Your server should now be available via the associated elastic IP and the IP address will persist across all future stop/start cycles. Note that although one elastic IP per server is free, that is only whilst it is associated with a running server. I.e. if it's not associated with a server or is associated with a stopped server, AWS will charge you for it.