Sagemaker Connector - Temporary failure in name resolution


On testing the Amazon Sagemaker model integration in v2.9.0, I receive the following error when calling the _predict api on the deployed model using sagemaker connector

"caused_by": {
      "type": "privileged_action_exception",
      "reason": "privileged_action_exception: null",
      "caused_by": {
        "type": "i_o_exception",
        "reason": " Temporary failure in name resolution"

The url, I use when creating the sagemaker connector is “{endpoint_name}/invocations

Can anyone please spot me what is going wrong here. Thanks in advance.

Can you paste your request body here by removing the credential values ?

From your connector url{endpoint_name}/invocations, you want to refer to endpoint_name defined in parameters part ? If yes, you should use${parameters.endpoint_name}/invocations

You can find connector blueprint for several ML platforms like OpenAI, Cohere, Sagemaker here

@ylwu Thanks for the response.

Request body,

POST /_plugins/_ml/connectors/_create
    "name": "test",
    "description": "Test connector for Sagemaker embedding model",
    "version": 1,
    "protocol": "aws_sigv4",
    "credential": {
        "access_key": "",
        "secret_key": "",
        "session_token": ""
    "parameters": {
        "region": "us-east-1",
        "service_name": "sagemaker"
    "actions": [
            "action_type": "predict",
            "method": "POST",
            "headers": {
                "content-type": "text/plain"
            "url": "https://runtime.sagemaker.${parameters.region}<endpoint-name>/invocations",
            "request_body": "[\"${parameters.inputs}\"]"

I am hardcoding the value for endpoint-name directly in the url.

Can you share a sample request body for your Sagemaker model? You can use PostMan or Insomnia to test your Sagemaker endpoint first. This one may not suitable for your model: "[\"${parameters.inputs}\"]"

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.