Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete an Elastic IP Address in AWS

Tags:

I can't seem to delete it in AWS, It was not showing any options like delete or disassociate.

AWS is charging me every month for Elastic IP address usage. I'm not even using them.

Please help me, how to remove the EIP address.

like image 971
Srinivas R Avatar asked Jun 21 '18 20:06

Srinivas R


People also ask

How do you cancel an elastic IP address?

To release an Elastic IP addressOpen the Amazon EC2 console at https://console.aws.amazon.com/ec2/ . In the navigation pane, choose Elastic IPs. Select the Elastic IP address, choose Actions, and then select Release addresses. Choose Release when prompted.

How do I remove a public IP address from an EC2 instance?

Open Elastic IPs and associate an elastic IP to the ec2 with secondary private IP. Start the Ec2 Instace. Open Network Interface Manage IP address settings and unassign the secondary IP. Done, now you can release the previously associated elastic IP.

Why can't I release Elastic IP?

Before releasing an elastic IP, select that this address is not associated with any AWS resources; such as an EC2 instance, NAT gateway, or Network Load Balancer; otherwise, you will not be able to release it.


2 Answers

An Elastic IP address is a reserved public IP address that you can assign to any EC2 instance in a particular region, until you choose to release it. To allocate an Elastic IP address to your account in a particular region

AWS Charges you for every EIP you have which is not used (=not associated to any resource)

To release (=delete) an Elastic IP, follow these steps:

  1. Go to the EC2 console
  2. Under the Network & Security tab, choose Elastic IPs
  3. Select the IP address you wish to remove
  4. Click on actions and choose Release Address.

If the option Release Address is greyed out, it means that the IP address you've selected is still associated with a resource. Then you'll need to click on Disassociate Address first.

like image 144
ThomasVdBerge Avatar answered Oct 20 '22 08:10

ThomasVdBerge


For those getting the following error when trying to disassociate an Elastic IP address.

"You do not have permission to access the specified resource."

I found that I still had the IP associated with a NAT Gateway. So you would need to delete the NAT, disassociate the IP, then you can release it.

like image 30
Jayson H Avatar answered Oct 20 '22 08:10

Jayson H