If an Elastic Compute Service (ECS) instance no longer needs a secondary elastic network interface (ENI), you can unbind the ENI from the instance. This topic describes how to unbind an ENI from an ECS instance.
Prerequisites
The ENI that you want to unbind from an instance is a secondary ENI. Primary ENIs cannot be unbound from instances.
The instance from which you want to unbind the ENI is in the Stopped or Running state.
NoteENIs can be unbound from instances of specific instance types only when the instances are in the Stopped state. For information about the instance types, see the "Instance types for which instances must be in the Stopped state" section of the "Bind an ENI" topic.
Procedure
Unbind an ENI in the ECS console
Log on to the ECS console.
In the left-side navigation pane, choose .
In the upper-left corner of the top navigation bar, select a region.
Find a secondary ENI that is in the InUse state and click Unbind in the Actions column.
In the Unbind message, confirm the information and click OK.
If the state of the ENI changes to Available after you refresh the ENI list, the ENI is unbound from the instance.
Unbind an ENI by calling an API operation
Call the DetachNetworkInterface operation with the NetworkInterfaceId
parameter specified to unbind an ENI from an instance.