Detaching an FNI from an Instance

You can detach a flexible network interface (FNI) from an instance it is attached to, at any time. Network traffic directed to this FNI stops being directed to the instance once the FNI is detached.

This action updates the state of the FNI from in-use to available. For more information, see About FNIs > FNIs Attachment to Instances.

You cannot, however, detach the primary network interface from an instance.

Detaching an FNI from an Instance Using Cockpit v1

  1. Click Network/Security > Flexible Network Interfaces.

  2. Click the FNI you want to detach from an instance.
    The FNI is selected.

  3. Click Detach .
    A confirmation dialog box appears.

  4. Click Detach to validate.
    The FNI is detached from the selected instance.

Unlinking a NIC from a VM Using OSC CLI

See the UnlinkNic command sample in the documentation of the OUTSCALE API.

Detaching an FNI from an Instance Using AWS CLI

To detach an FNI from an instance, use the detach-network-interface command following this syntax:

Request sample
$ aws ec2 detach-network-interface \
  --profile YOUR_PROFILE \
  --attachment-id eni-attach-1234abcd \

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.

  • attachment-id: The ID of the attachment operation.

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

The FNI is detached from the instance.

Related Pages

Corresponding API Methods

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