How do I troubleshoot “The allocation ID is not valid, cannot release allocation for resource type VPC” error?

2 minute read
0

I want to resolve the error: “The allocation ID is not valid, cannot release allocation for resource type VPC.”

Resolution

To dealloacate an Amazon Virtual private Cloud (Amazon VPC) CIDR from the Amazon VPC IPAM pool, you can either delete the VPC or set its monitoring status to Ignored.
Note: You can't call release-ipam-pool-allocation against a VPC CIDR.

Delete the VPC

Follow these steps:

  1. Open the Amazon Elastic Compute Cloud (Amazon EC2) console.
  2. Remove all instances of the VPC. For more information, see Terminate your instance.
  3. Open the Amazon VPC console.
  4. In the navigation pane, choose Your VPCs.
  5. Select the VPC to delete and choose Actions, Delete VPC.
    Note: The console might display resources that you must delete before you can delete the VPC. Delete these resources and then try again. For more information on deleting resources, see Delete your VPC.
  6. When prompted, enter delete. Then, choose Delete.

Ignore the VPC

To change the monitoring status of a single CIDR allocated to a VPC:

  1. Open the VPC IPAM console.
  2. In the navigation pane, choose Resources.
  3. From the dropdown list at the top of the content pane, choose the private scope you want to use.
  4. In the content pane, choose the VPC and view the details of the VPC.
  5. For Associated CIDRs, select one of the CIDRs allocated to the VPC.
  6. Choose Actions. Then, choose Mark as ignored.
AWS OFFICIAL
AWS OFFICIALUpdated 9 months ago
2 Comments

There seems to be no option to remove an allocation from a public scope. For example, if someone brought their BYOIP, IPv6 for instance. You can't remove it from the allocation pool once it's tagged with a VPC and disassociated later. Even if you try to remove it from cli it gives the following error.

An error occurred (InvalidParameterValue) when calling the ReleaseIpamPoolAllocation operation: The allocation ID ipam-pool-alloc-xyz is not valid. Cannot release allocation for resource type VPC.

Aman
replied 16 days ago

Thank you for your comment. We'll review and update the Knowledge Center article as needed.

profile pictureAWS
MODERATOR
replied 15 days ago