aws ec2 detach-network-interface
Detaches a network interface from an instance. AWS CLI reference
1 example 3 options Its page in the AWS CLI reference
Examples
To detach a network interface from your instance
The following detach-network-interface example detaches the specified network interface from the specified instance.
aws ec2 detach-network-interface --attachment-id eni-attach-66c4350aIdentify--attachment-idThe ID of the attachment.This command produces no output.
For more information, see Elastic network interfaces in the Amazon EC2 User Guide.
Options
--attachment-idThe ID of the attachment.--dry-runChecks whether you have the required permissions for the action, without actually making the request, and provides an error response.--forceSpecifies whether to force a detachment.