Using Java TransportClient for access to AWS ElasticSearch instance

(Josef Hák) #1


Is it possible to use Java TransportClient when using AWS ElasticSearch instance and access token? Where can I find documentation for that, please?

Thanks for any advice.

(David Pilato) #2

No but which runs on AWS supports it.

(Josef Hák) #3

I have my own AWS Elasticsearch instance. From Python I connect it using generated access token. Python package "elasticsearch==5.4.0" has support for it. I need to choose good Java solution. I successfully connected to local ES instance from both Java TransportClient and Java REST. But I don't know how to connect to AWS instance where using of access token is needed.

(David Pilato) #4

If you are running your own ES instance, what does "access token" mean?
There is nothing like this in elasticsearch by default.

Are you using x-pack to secure your elasticsearch instance?

(Josef Hák) #5

Access token is used when connecting to AWS Elasticsearch instance only. When I connect to my local instance, no access token is used. I don't know which Java client should I use when connecting to AWS Elasticsearch instance. I don't use x-pack, because it's for elasticsearch installation. It's not my case. Thanks.

(Christian Dahlqvist) #6

As far as I know, the AWS Elasticsearch service (if this is what you are using) does not support the transport protocol, which means that you will need to use a REST based Java client. The Python client works as it is REST based.

(Josef Hák) #7

I think so too. But I can't find full documentation of Java REST API. It's not contained in org.elasticsearch javadoc: Example of using with AWS is also missed here:

(David Pilato) #8

This is what the Java REST Client supports for authentication:

It's fully compatible with

(Josef Hák) #9

I don't need connect to, but to Amazon Web Services Elasticsearch.

(David Pilato) #10

I hear you.

If the official client does not work with whatever other non official provider, then you probably need to ask this provider for advices.

I can tell you that this client works fine with:

  • Local instances
  • instances
  • Own deployed instances on whatever cloud provider, such as AWS, GCP, Azure...

And probably some others.

May I suggest that you ask your question on AWS forums and eventually update this thread so others will know what is needed to be done?

(Josef Hák) #11

Ok, I will try it.

(system) #12

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