Reindex from AWS elasticsearch to elastic cloud

We have a AWS Elasticsearch cluster. We are trying to reindex this onto elastic cloud instance. We have created Elasticsearch intstance on elastic cloud. and from kibana trying to reindex. We have listed remote source (AWS Elasticsearch) in reindex.remote.whitelist. But still, we are getting "User not authorised to do HTTPGet" error when tring to reindex.

Any help is appreciated

Welcome to our community! :smiley:

This sounds like the aws service causing issues with the authentication.
Can you share the full reindex request and error?

here is the reindex request

POST _reindex?pretty=true&scroll=10h&wait_for_completion=false
{
  "source": {
    "remote": {
      "host": "https://search-staging-63-a-zq42juvgs5cvwkxd2k3q7hurx4.us-east-1.es.amazonaws.com:443",
      "socket_timeout": "60m"
    },
    "size": 100,
    "index": "survale__surveys"
  },
  "dest": {
    "index": "survale__surveys"
  }
}

and here is the error

"error" : {
    "type" : "status_exception",
    "reason" : """body={"Message":"User: anonymous is not authorized to perform: es:ESHttpGet"}""",
    "caused_by" : {
      "type" : "response_exception",
      "reason" : """method [GET], host [https://search-staging-63-a-zq42juvgs5cvwkxd2k3q7hurx4.us-east-1.es.amazonaws.com:443], URI [/], status line [HTTP/1.1 403 Forbidden]
{"Message":"User: anonymous is not authorized to perform: es:ESHttpGet"}"""
    }
  }

I think you should do something like:

POST _reindex?pretty=true&scroll=10h&wait_for_completion=false
{
  "source": {
    "remote": {
      "host": "https://search-staging-63-a-zq42juvgs5cvwkxd2k3q7hurx4.us-east-1.es.amazonaws.com:443",
      "socket_timeout": "60m",
      "username": "user",
      "password": "pass"
    },
    "size": 100,
    "index": "survale__surveys"
  },
  "dest": {
    "index": "survale__surveys"
  }
}

And give the username / password that are needed for this.

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