How do I resolve the error "The address with allocation id cannot be released because it is locked to your account" when trying to release an Elastic IP address from my Amazon EC2 instance?

Last updated: 2019-04-28

How do I resolve the error "Error [IP address]: The address with allocation id [allocation id] cannot be released because it is locked to your account" when trying to release an Elastic IP address from my Amazon Elastic Compute Cloud (Amazon EC2) instance?

Short Description

This error message is generated when a reverse Domain Name System (rDNS) record is created for your Elastic IP address. The Elastic IP address is locked to your account for as long as the rDNS record exists.

Resolution

To confirm whether rDNS is set for your Elastic IP address

Run the following host command, and replace the 203.0.113.0 sample IP address with your IP address:

#host 203.0.113.0

If an rDNS is set for your Elastic IP address, this returns an output similar to the following:

203.0.113.0.in-addr.arpa. domain-name-pointer mail.domain.com

Request removal of the rDNS entry

1.    Open the Request to Remove Email Sending Limitations form.

2.    Complete the form using the following information:

Email Address: Your email address
Use Case Description: Leave blank
Elastic IP Address 1: The first IP address with an rDNS
Elastic IP Address 2: Leave blank
Reverse DNS Record for EIP 1: Enter please remove rDNS
Reverse DNS Record for EIP 2: Leave blank

3.    Choose Submit.

Note: Removing the rDNS might take a few days to propagate through the system.

Release the Elastic IP address

1.    After you receive notice that the rDNS is removed, run the host command for your IP address to validate that it is removed:

#host 203.0.113.0

This returns an output similar to the following:

203.0.113.0.in-addr.arpa. domain-name-pointer ec2-54-244-68-210.us-west-2.compute.amazonaws.com.

2.    Open the Amazon EC2 console, and choose Elastic IPs from the navigation pane.

3.    Select the Elastic IP address, choose Actions, and then select Release addresses.

4.    Choose Release.


Did this article help you?

Anything we could improve?


Need more help?