{"record":{"id":"c812d6c50ba0f730","repo":"kubernetes/kops","slug":"received-status-code-d-from-sts-s","errorCode":null,"errorMessage":"received status code %d from STS: %s","messagePattern":"received status code (.+?) from STS: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/bootstrap/awsbootstrap/verifier.go","lineNumber":424,"sourceCode":"\treq := &http.Request{\n\t\tURL:    reqURL,\n\t\tMethod: decoded.Method,\n\t\tHeader: decoded.SignedHeader,\n\t}\n\tresponse, err := httpClient.Do(req)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"sending STS request: %v\", err)\n\t}\n\tif response != nil {\n\t\tdefer response.Body.Close()\n\t}\n\n\tresponseBody, err := io.ReadAll(response.Body)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"reading STS response: %v\", err)\n\t}\n\tif response.StatusCode != 200 {\n\t\treturn nil, fmt.Errorf(\"received status code %d from STS: %s\", response.StatusCode, string(responseBody))\n\t}\n\n\tcallerIdentity := &GetCallerIdentityResponse{}\n\terr = xml.NewDecoder(bytes.NewReader(responseBody)).Decode(callerIdentity)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"decoding STS response: %v\", err)\n\t}\n\n\treturn callerIdentity, nil\n}\n\n// GetCallerIdentityV1 will request the presigned token URL, and decode the returned identity.\nfunc (s *stsRequestValidator) getCallerIdentityV1(ctx context.Context, httpClient *http.Client, decoded awsV1Token) (*GetCallerIdentityResponse, error) {\n\t// Well-known V1 request body\n\tbody := []byte(\"Action=GetCallerIdentity&Version=2011-06-15\")\n\n\t// The host is not passed in V1 (a shortcoming of V1)\n\thost := s.Host","sourceCodeStart":406,"sourceCodeEnd":442,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/bootstrap/awsbootstrap/verifier.go#L406-L442","documentation":"Status guard in getCallerIdentityV2: STS returned a non-200 HTTP status for the replayed presigned request (e.g. 403 signature mismatch or throttling), with the body included for diagnosis. The identity verification failed server-side.","triggerScenarios":"Thrown at pkg/bootstrap/awsbootstrap/verifier.go:424 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check for expired presigned URLs","Verify clock skew between node and AWS","Retry after throttling backs off"],"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-12T12:17:11.808Z"}