{"record":{"id":"cc861507a42761fa","repo":"kubernetes/kops","slug":"error-from-ec2-describeinstances-request-v","errorCode":null,"errorMessage":"error from ec2 DescribeInstances request: %v","messagePattern":"error from ec2 DescribeInstances request: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/nodeidentity/aws/identify.go","lineNumber":169,"sourceCode":"\t// If caching is enabled add the nodeidentity.Info to cache.\n\tif i.cacheEnabled {\n\t\terr = i.cache.Add(info)\n\t\tif err != nil {\n\t\t\tklog.Warningf(\"Failed to add node identity info to cache: %v\", err)\n\t\t}\n\t}\n\n\treturn info, nil\n}\n\n// getInstance queries EC2 for the instance with the specified ID, returning an error if not found\nfunc (i *nodeIdentifier) getInstance(ctx context.Context, instanceID string) (*ec2types.Instance, error) {\n\t// Based on node-authorizer code\n\tresp, err := i.ec2Client.DescribeInstances(ctx, &ec2.DescribeInstancesInput{\n\t\tInstanceIds: []string{instanceID},\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error from ec2 DescribeInstances request: %v\", err)\n\t}\n\n\t// @check we found some instances\n\tif len(resp.Reservations) == 0 || len(resp.Reservations[0].Instances) == 0 {\n\t\treturn nil, fmt.Errorf(\"missing instance id: %s\", instanceID)\n\t}\n\tif len(resp.Reservations[0].Instances) > 1 {\n\t\treturn nil, fmt.Errorf(\"found multiple instances with instance id: %s\", instanceID)\n\t}\n\n\tinstance := resp.Reservations[0].Instances[0]\n\treturn &instance, nil\n}\n","sourceCodeStart":151,"sourceCodeEnd":183,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/nodeidentity/aws/identify.go#L151-L183","documentation":"The raw EC2 DescribeInstances API call for the node's instance ID returned an error (auth, throttling, network). This is a transient/service-level failure wrapper around the AWS SDK response, not a not-found condition.","triggerScenarios":"Thrown at pkg/nodeidentity/aws/identify.go:169 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry; throttling and transient API errors usually resolve","Verify the node's IAM role permits ec2:DescribeInstances","Check network connectivity from the node to the EC2 endpoint"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}