{"record":{"id":"5fbe0143d57f3d98","repo":"kubernetes/kops","slug":"error-describing-network-interfaces-w","errorCode":null,"errorMessage":"error describing network interfaces: %w","messagePattern":"error describing network interfaces: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/awsup/aws_cloud.go","lineNumber":1567,"sourceCode":"\nfunc (c *awsCloudImplementation) FindELBV2NetworkInterfacesByName(vpcID string, loadBalancerName string) ([]ec2types.NetworkInterface, error) {\n\treturn findELBV2NetworkInterfaces(c, vpcID, loadBalancerName)\n}\n\nfunc findELBV2NetworkInterfaces(c AWSCloud, vpcID, lbName string) ([]ec2types.NetworkInterface, error) {\n\tklog.V(2).Infof(\"Listing all NLB network interfaces\")\n\tctx := context.TODO()\n\n\trequest := &ec2.DescribeNetworkInterfacesInput{\n\t\tFilters: []ec2types.Filter{\n\t\t\tNewEC2Filter(\"vpc-id\", vpcID),\n\t\t\tNewEC2Filter(\"interface-type\", \"network_load_balancer\"),\n\t\t},\n\t}\n\n\tresponse, err := c.EC2().DescribeNetworkInterfaces(ctx, request)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error describing network interfaces: %w\", err)\n\t}\n\n\tvar found []ec2types.NetworkInterface\n\tfor _, ni := range response.NetworkInterfaces {\n\t\tif strings.HasPrefix(aws.ToString(ni.Description), \"ELB net/\"+lbName+\"/\") {\n\t\t\tfound = append(found, ni)\n\t\t}\n\t}\n\n\treturn found, nil\n}\n\nfunc (c *awsCloudImplementation) DescribeELBV2Tags(loadBalancerArns []string) (map[string][]elbv2types.Tag, error) {\n\treturn describeELBV2Tags(c, loadBalancerArns)\n}\n\nfunc describeELBV2Tags(c AWSCloud, loadBalancerArns []string) (map[string][]elbv2types.Tag, error) {\n\t// TODO: Filter by cluster?","sourceCodeStart":1549,"sourceCodeEnd":1585,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/awsup/aws_cloud.go#L1549-L1585","documentation":"Returned when EC2 DescribeNetworkInterfaces fails while searching for network interfaces belonging to a network load balancer (interface-type network_load_balancer, description prefix 'ELB net/<lbName>/'). kOps uses this to find NLB ENIs for target group / instance bookkeeping.","triggerScenarios":"DescribeNetworkInterfaces failing due to throttling, missing ec2:DescribeNetworkInterfaces permission, invalid filter combination, or an unavailable/incorrect region/endpoint.","commonSituations":"Large accounts hitting EC2 describe rate limits; IAM policy lacking ENI describe; NLB created in a different region than the cloud client; transient AWS outages.","solutions":["Grant ec2:DescribeNetworkInterfaces to the calling IAM principal.","Retry — describe calls are frequently throttled; check for Throttling in the wrapped error.","Verify region consistency between the NLB and the AWSCloud client.","Confirm the LB name used to build the filter is correct."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Confirm the NLB exists before scanning its ENIs\n_, err := elbv2Client.DescribeLoadBalancers(ctx, &elbv2.DescribeLoadBalancersInput{Names: []string{lbName}})\nif err != nil { /* abort ENI lookup */ }","typeGuard":null,"tryCatchPattern":"nis, err := c.describeNLBNetworkInterfaces(ctx, lbName)\nif err != nil {\n    var throttle smithy.APIError\n    if errors.As(err, &throttle) && strings.Contains(throttle.ErrorCode(), \"Throttling\") {\n        time.Sleep(backoff)\n        nis, err = c.describeNLBNetworkInterfaces(ctx, lbName)\n    }\n    if err != nil { return nil, err }\n}","preventionTips":["Grant ec2:DescribeNetworkInterfaces","Throttle/batch describe calls on large accounts","Keep AWSCloud client region aligned with the NLB","Retry transient describe failures with exponential backoff"],"tags":["aws","ec2","network-interfaces","nlb","describe"],"backgroundTag":"aws-api-error","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}