weaviate/weaviate · error
connection to AWS Sagemaker failed with status: %v error: %s
Error message
connection to AWS Sagemaker failed with status: %v error: %s
What it means
The SageMaker endpoint returned a non-200 status and the response body contained a Message field, i.e. SageMaker itself reported an error. Both the HTTP status and the provider's message are surfaced. This points at the endpoint configuration or the deployed model (bad invocation payload for that endpoint, endpoint in Failed/Updating state, auth) rather than at Weaviate.
Source
Thrown at modules/generative-aws/clients/aws.go:514
if len(resBody.Results) > 0 && len(resBody.Results[0].CompletionReason) > 0 {
content = resBody.Results[0].OutputText
} else if len(resBody.Generations) > 0 {
content = resBody.Generations[0].Text
}
return content, nil
}
func (v *awsClient) parseSagemakerResponse(bodyBytes []byte, res *http.Response) (*modulecapabilities.GenerateResponse, error) {
var resBody sagemakerGenerateResponse
if err := json.Unmarshal(bodyBytes, &resBody); err != nil {
return nil, fmt.Errorf("failed to parse generative response (status %d): %w", res.StatusCode, err)
}
if res.StatusCode != 200 || resBody.Message != nil {
if resBody.Message != nil {
return nil, fmt.Errorf("connection to AWS Sagemaker failed with status: %v error: %s",
res.StatusCode, *resBody.Message)
}
return nil, fmt.Errorf("connection to AWS Sagemaker failed with status: %d", res.StatusCode)
}
if len(resBody.Generations) == 0 {
return nil, fmt.Errorf("received empty response from AWS Sagemaker")
}
if len(resBody.Generations) > 0 && len(resBody.Generations[0].Id) > 0 {
content := resBody.Generations[0].Text
if content != "" {
return &modulecapabilities.GenerateResponse{
Result: &content,
}, nil
}
}
return &modulecapabilities.GenerateResponse{View on GitHub (pinned to 75aa4b6d11)
Solutions
- Read the SageMaker message in the error — it typically names the exact problem with the deployed endpoint
- Verify the endpoint name and region in the class configuration, and that the endpoint is InService
- Ensure the request body matches the input schema the deployed SageMaker model expects (each custom model defines its own JSON contract)
- Check IAM permissions for sagecharger:InvokeEndpoint on the endpoint
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at modules/generative-aws/clients/aws.go:514 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/536a59e73c66a8e4.
Report an issue: GitHub.