Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to Digg

ReleaseAddress

Description

Releases an Elastic IP address allocated to your account.

This action applies to both EC2 Elastic IP addresses and VPC Elastic IP addresses. For information about VPC addresses and how they differ from EC2 addresses, go to Elastic IP Addresses in the Amazon Virtual Private Cloud User Guide.

If you run this action on an Elastic IP address that is already released, the address might be assigned to another account, which will cause Amazon EC2 to return an error (AuthFailure).

[Note]Note

For EC2 addresses only: Releasing an IP address automatically disassociates it from any instance it's associated with. To disassociate an IP address without releasing it, use the DisassociateAddress action.

If you try to release a VPC address that's associated with an instance, Amazon EC2 returns an error (InvalidIPAddress.InUse).

[Important]Important

After releasing an Elastic IP address, it is released to the IP address pool and might be unavailable to your account. Make sure to update your DNS records and any servers or devices that communicate with the address.

Request Parameters

NameDescriptionRequired

PublicIp

The EC2 Elastic IP address to release.

Type: String

Default: None

Condition: Required for EC2 Elastic IP addresses

Conditional

AllocationId

The allocation ID that AWS provided when you allocated the address for use with Amazon VPC.

Type: String

Default: None

Condition: Required for VPC Elastic IP addresses

Conditional

Response Elements

The elements in the following table are wrapped in a ReleaseAddressResponse structure.

NameDescription

requestId

The ID of the request.

Type: xsd:string

return

Returns true if successful. Otherwise, returns an error.

Type: xsd:boolean

Examples

Example Request

This example releases an EC2 Elastic IP address (67.202.55.255).

https://ec2.amazonaws.com/?Action=ReleaseAddress
&PublicIp=192.0.2.1
&AUTHPARAMS

Example Request

This example releases a VPC Elastic IP address with allocation ID eipalloc-5723d13e.

https://ec2.amazonaws.com/?Action=ReleaseAddress
&AllocationId=eipalloc-5723d13e
&AUTHPARAMS

Example Response

<ReleaseAddressResponse xmlns="http://ec2.amazonaws.com/doc/2011-01-01/">
  <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> 
  <return>true</return>
</ReleaseAddressResponse>