Does Spring Data Elasticsearch support Amazon Elasticsearch?

From different discussions:
- Spring data ES and searchly
- port for the transport protocol

and the AWS documentation on ES service limitations; go to the bottom, the last line says:

The service supports HTTP on port 80, but does not support TCP transport.

It's not yet possible to use Spring Data ES which uses the Java APIs, with Amazon service which only available through REST.


There is a nice project providing Jest implementation of Spring Data ES that works with AWS managed ES service.

Checkout https://github.com/VanRoy/spring-data-jest


Looks like Spring data elastic search from version 3.2.0 works with http rest client, so it is possible to connect to aws elastic instance through Rest API and port 443. Somehow they integrated spring-data-jest approach into spring data. I use RestHighLevelClient:

    @Bean
    public RestHighLevelClient client() {
        return new RestHighLevelClient(RestClient.builder(HttpHost.create(awsUrl)));
    }

awsUrl format is: https://some_aws_generated_address.us-east-n.es.amazonaws.com:443

NOTE: If you are using spring boot with default bom.xml, you need to upgrade spring boot to 2.2.1.RELEASE or newer