Release an allocation - Amazon Virtual Private Cloud
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Release an allocation

Follow the steps in this section to release a CIDR allocation from an IPAM pool. An allocation is a CIDR assignment from an IPAM pool to another resource or IPAM pool.

If you are planning to delete a pool, you might need to release a pool allocation. You cannot delete pools if the pools have CIDRs provisioned, and you cannot deprovision CIDRs if the CIDRs are allocated to resources.

Note
  • To release a manual allocation, use the steps in this section or call the ReleaseIpamPoolAllocation API.

  • To release an allocation in a private scope, you must ignore or delete the resource CIDR. For more information, see Change the monitoring state of VPC CIDRs. After some time, Amazon VPC IPAM will automatically release the allocation on your behalf.

    Example

    If you have a VPC CIDR in a private scope, to release the allocation you must either ignore or delete the VPC CIDR. After some time, Amazon VPC IPAM will automatically release the VPC CIDR allocation from the IPAM pool.

  • To release an allocation in a public scope, you must delete the resource CIDR. You cannot ignore public resource CIDRs. For more information, see Cleanup in Bring your own public IPv4 CIDR to IPAM using only the Amazon CLI or Cleanup in Bring your own IPv6 CIDR to IPAM using only the Amazon CLI. After some time, Amazon VPC IPAM will automatically release the allocation on your behalf.

For Amazon VPC IPAM to release allocations on your behalf, all account permissions must be properly configured for either single-account use or multi-account use.

When you release a CIDR that’s managed by your IPAM, Amazon VPC IPAM recycles the CIDR back into an IPAM pool. It takes a few minutes for the CIDR to become available for future allocations. For more information about pools and allocations, see How IPAM works.

Amazon Management Console
To release a pool allocation
  1. Open the IPAM console at https://console.amazonaws.cn/ipam/.

  2. In the navigation pane, choose Pools.

  3. From the dropdown menu at the top of the content pane, choose the scope you want to use. For more information about scopes, see How IPAM works.

  4. In the content pane, choose the pool that the allocation is in.

  5. Choose the Allocations tab.

  6. Select one or more allocations. You can identify allocations by their Resource type:

    • custom: A custom allocation.

    • vpc: A VPC allocation.

    • ipam-pool: An IPAM pool allocation.

    • ec2-public-ipv4-pool: A public IPv4 pool allocation.

  7. Choose Actions > Release custom allocation.

  8. Choose Deallocate CIDR.

Command line

The commands in this section link to the Amazon CLI Reference documentation. The documentation provides detailed descriptions of the options that you can use when you run the commands.

Use the following Amazon CLI commands to release a pool allocation:

  1. Get an IPAM pool ID: describe-ipam-pools

  2. View your current allocations in the pool: get-ipam-pool-allocations

  3. Release an allocation: release-ipam-pool-allocation

  4. View your updated allocations: get-ipam-pool-allocations

To add a new allocation, see Allocate CIDRs. To delete the pool after releasing allocations, you must first Deprovision CIDRs from a pool.