{"record":{"id":"8a05b78d7f94d912","repo":"kubernetes/kops","slug":"missing-instance-id-s-8a05b7","errorCode":null,"errorMessage":"missing instance id: %s","messagePattern":"missing instance id: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/nodeidentity/aws/identify.go","lineNumber":174,"sourceCode":"\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":156,"sourceCodeEnd":183,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/nodeidentity/aws/identify.go#L156-L183","documentation":"DescribeInstances succeeded but returned no reservations/instances for the given instance ID: the EC2 instance no longer exists (or is in another account/region). A not-found guard for the node's backing instance.","triggerScenarios":"Thrown at pkg/nodeidentity/aws/identify.go:174 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Delete the stale Kubernetes Node object if the instance was terminated","Verify kOps and the node use the same AWS account/region","Re-create the instance/instance-group if it was deleted unintentionally"],"exampleFix":null,"handlingStrategy":"validation","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"}