If an Elastic Compute Service (ECS) instance no longer requires a secondary elastic network interface (ENI), you can unbind the secondary ENI from the instance. This topic describes how to unbind a secondary ENI from an ECS instance.
You cannot unbind the primary ENI from an ECS instance.
Prerequisites
The ECS instance from which you want to unbind a secondary ENI is in the Stopped or Running state.
Instance types for which instances must be in the Stopped state
If elastic Remote Direct Memory Access (eRDMA) is enabled for the secondary ENI that you want to unbind, you must check whether applications are using eRDMA. If applications are using eRDMA, you must stop the applications. The eRDMA kernel module cannot unbind the eRDMA-enabled secondary ENI if you do not stop user-mode applications that are using eRDMA. An eRDMA-enabled secondary ENI is also referred to as a secondary elastic RDMA interface (ERI).
Procedure
Log on to the ECS console.
In the left-side navigation pane, choose .
In the top navigation bar, select the region and resource group to which the resource belongs.
Find a secondary ENI that is in the InUse state and click Unbind from Instance in the Operation column.
In the Unbind from Instance message, confirm the information and click Confirm.
If the status of the ENI changes to Available after you refresh the ENI list, the ENI is unbound from the instance.
References
You can also call the DetachNetworkInterface operation to unbind a secondary ENI from an ECS instance.
You can perform the following operations on a secondary ENI that is in the Available state:
Bind the secondary ENI to an ECS instance. For more information, see Bind a secondary ENI.
Delete the secondary ENI. For more information, see Delete a secondary ENI.
Modify the attributes of the secondary ENI. For more information, see Modify the attributes of an ENI.
Modify the tags of the secondary ENI. For more information, see Modify the tags of an ENI.