The following AWS CLI command will determine if there are any network interfaces attached to a given VPC ID.
aws ec2 describe-network-interfaces --region eu-west-1 --filters 'Name=vpc-id,Values=vpc-12345678' --query 'NetworkInterfaces[*].NetworkInterfaceId'
If the array returns empty (e.g. []
), there are no active network interfaces attached. Otherwise, a list of interface IDs will be returned.