Disassociating an EIP from an Instance or a Network Interface

You can disassociate an External address IP (EIP) from an instance or a network interface it is associated with.

To disassociate an EIP from a NAT gateway, you need to delete the NAT gateway. For more information, see Deleting a NAT Gateway.

After you disassociate it, the EIP is still allocated to your account and can be associated again. If you do not need the EIP anymore, you can release it from your account. For more information, see Releasing an EIP from Your Account.

Disassociating an EIP from an Instance or a Network Interface Using Cockpit

  1. Click Network/Security > External IPs.

    You can also disassociate an EIP from an instance in the Instances page.

  2. Click the EIP you want to disassociate from an instance.
    The EIP is selected.

  3. Click Dissociate Instance .
    A confirmation dialog box appears.

  4. Click Dissociate to validate.
    The EIP is disassociated from the instance.

Disassociating an EIP from an Instance or a Network Interface Using AWS CLI

To disassociate an EIP from an instance, use the disassociate-address command following this syntax:

Request sample
$ aws ec2 disassociate-address \
    --profile YOUR_PROFILE \
    --public-ip 111.11.111.1 \
    [--association-id NOT_SPECIFIED] \
    --endpoint https://fcu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • (optional) public-ip: The EIP.

  • (optional) association-id: The ID of the association.

    • In the public Cloud, you need to specify the public-ip attribute.

    • In a VPC, you need to specify the association-id attribute.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The EIP is disassociated and is available again in your account.

Related Pages

Corresponding API Method

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.