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: 2021-01-15
I'm receiving the error "Error [IP address]: The address with allocation id [allocation id] cannot be released because it is locked to your account" when releasing an Elastic IP address from my Amazon Elastic Compute Cloud (Amazon EC2) instance. What do I do to correct the underlying problem?
This error message generates when a reverse Domain Name System (rDNS) record is created for your Elastic IP address. The Elastic IP address locks to your account for as long as the rDNS record exists.
Confirm whether rDNS is set for your Elastic IP address
1. Connect to your instance using SSH.
2. Run the host command. Replace the 203.0.113.0 sample IP address with your IP address.
$ #host 203.0.113.0
If your Elastic IP address has an rDNS set, the preceding command returns 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: Your specific use case for requesting rDNS removal.
Elastic IP address: This field is optional.
Reverse DNS record: This field is optional.
Reverse DNS Record for EIP 1: Enter please remove rDNS.
Reverse DNS Record for EIP 2: Leave blank.
Note: Adding Elastic IP addresses is optional. You have the option to enter up to 100 Elastic IP addresses and 100 reverse DNS records.
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 confirmation of the rDNS removal, run the host command for your IP address to verify removal completion:
$ #host 203.0.113.0
The preceding command returns 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 then choose Elastic IPs from the navigation pane.
3. Select the Elastic IP address, and then choose Actions, Release addresses.
4. Choose Release.