bcuff / elasticsearch-net-aws

Add-on to Elasticsearch.Net & NEST for using AWS's elasticsearch service.
Apache License 2.0
72 stars 27 forks source link

Authorization Header not passed in Request #69

Open ajvs opened 2 years ago

ajvs commented 2 years ago

I'm trying to use v7.1.0 with Elasticsearch.net v7.7 and Nest v7.14.1. After upgrading from v6.0, I am now getting 403 response from my AWS Elasticsearch endpoint. I found out that with the latest version the Authorization Header is not passed to the request.

Please see sample code below for creating the ElasticClient.

var httpConnection = new AwsHttpConnection(new BasicAWSCredentials(
                    AWSAccessKey,
                    AWSSecretKey
                ), Amazon.RegionEndpoint.USEast1);

                ConnectionSettings settings = new ConnectionSettings(pool, httpConnection);

               ElasticClient client = new ElasticClient(settings);