Why Can't I Associate Elastic IP with EC2 Instance?

You can't allocated a VPC EIP with an EC2-classic instance. I suspect Elastic IPs are allocated in VPC by default.

I suggest you allocate a new EIP you look for options about where it's created and make sure it says "EC2 Classic". I don't have access to EC2-classic as my account is too new. Amazon has documentation on this topic here.

This page has some useful information:

After some playing around – for way longer than I wanted to spend – I deleted the elastic IP and recreated it. When first creating (“allocating”) an elastic IP it gives you two choices – EC2 or VPC. The default selected in the list is EC2 and that’s what I originally left as my selected choice. I changed this to VPC and voila! – now I could associate the IP to my running VM nice and easily.


It is now possible to migrate an EIP between standard scope and VPC scope but you first need to disassociate your Elastic IP from your instance (so you will see a short amount of downtime). NOTE: if the EIP was created in the VPC scope, you can't migrate to standard scope.

You can then move the Elastic IP between the scopes:

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.


I had the same problem. It turned out that the regions didn't match.

Solution:

From the same browser tab, same console where you can see your instance running, go to EIP, Allocate New Address. Click on AWS Command Line Interface command link to view what region is being used for the new address. It must match the region that's listed as Availability Zone for your instance. Allocate. Then, Associate the address. The instance you need will be on the list.


Where the wrong region came from:

FROM THEIR TUTORIAL. The link to all AWS services from the AWS tutorial point to a different region. Confirm it by looking at the url. Fix the issue by changing the region to the correct one directly in your address bar before logging in to the service.