{"record":{"id":"3f01f03ba22566cf","repo":"kubernetes/kops","slug":"listing-nlbs-v","errorCode":null,"errorMessage":"listing NLBs: %v","messagePattern":"listing NLBs: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/awstasks/network_load_balancer.go","lineNumber":148,"sourceCode":"\n\tif len(found) == 0 {\n\t\treturn nil, nil\n\t}\n\n\tif len(found) != 1 {\n\t\treturn nil, fmt.Errorf(\"Found multiple NLBs with DNSName %q\", dnsName)\n\t}\n\n\treturn &found[0], nil\n}\n\nfunc describeNetworkLoadBalancers(ctx context.Context, cloud awsup.AWSCloud, request *elbv2.DescribeLoadBalancersInput, filter func(elbv2types.LoadBalancer) bool) ([]elbv2types.LoadBalancer, error) {\n\tvar found []elbv2types.LoadBalancer\n\tpaginator := elbv2.NewDescribeLoadBalancersPaginator(cloud.ELBV2(), request)\n\tfor paginator.HasMorePages() {\n\t\tpage, err := paginator.NextPage(ctx)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"listing NLBs: %v\", err)\n\t\t}\n\t\tfor _, lb := range page.LoadBalancers {\n\t\t\tif filter(lb) {\n\t\t\t\tfound = append(found, lb)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn found, nil\n}\n\nfunc (e *NetworkLoadBalancer) getDNSName() *string {\n\treturn e.DNSName\n}\n\nfunc (e *NetworkLoadBalancer) getHostedZoneId() *string {\n\treturn e.HostedZoneId\n}","sourceCodeStart":130,"sourceCodeEnd":166,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/awstasks/network_load_balancer.go#L130-L166","documentation":"The paginated DescribeLoadBalancers call failed while searching NLBs (describeNetworkLoadBalancers); the ELBV2 API request itself errored (permissions, wrong region, throttling) and the wrapped error carries the AWS detail.","triggerScenarios":"paginator.NextPage(ctx) returns an error — AWS throttling (ThrottlingException), invalid credentials, authorization failure, or network/API error — while paging through the account's NLBs.","commonSituations":"Accounts with many load balancers hitting pagination and throttling; IAM missing elasticloadbalancing:DescribeLoadBalancers; temporary AWS regional issues.","solutions":["Grant elasticloadbalancing:DescribeLoadBalancers to the kops principal if UnauthorizedOperation","Retry after backoff if the cause is ThrottlingException","Check AWS health/status for the region if the API is failing broadly"],"exampleFix":"null","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"_, err := findNLBs(ctx)\nvar ae smithy.APIError\nif errors.As(err, &ae) && (ae.ErrorCode() == \"ThrottlingException\" || ae.ErrorCode() == \"RequestTimeout\") {\n    time.Sleep(exponentialBackoff(attempt)); retry()\n}","preventionTips":["Use exponential backoff for ELBv2 list operations","Ensure IAM includes elasticloadbalancing:DescribeLoadBalancers","Check AWS regional health before large applies"],"tags":["aws","nlb","pagination","api-error"],"backgroundTag":"aws-api-call-failed","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"}