use of com.amazonaws.auth.AWS4Signer in project vorto by eclipse.
the class ElasticSearchConfiguration method awsIndexingClient.
@Bean
@Profile({ "prod", "int" })
public RestHighLevelClient awsIndexingClient() {
logger.info("Creating an elastic server client with config(serviceName=" + serviceName + " region=" + region + " aesEndpoint=" + aesEndpoint);
AWS4Signer signer = new AWS4Signer();
signer.setServiceName(serviceName);
signer.setRegionName(region);
HttpRequestInterceptor interceptor = new AWSRequestSigningApacheInterceptor(serviceName, signer, credentialsProvider);
RestClientBuilder builder = RestClient.builder(HttpHost.create(aesEndpoint)).setHttpClientConfigCallback(httpClientConfig(getProxy(), interceptor));
return new RestHighLevelClient(builder);
}
Aggregations