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

Issue with default AWS credentials and roles #53

Closed pixelharmony closed 4 years ago

pixelharmony commented 4 years ago

Hi,

When creating an instance of AwsHttpConnection it seems to always default to the "default" profile that I have setup in my AWS credentials file.

In my appsettings.json file I have this.

"AWS": {
    "Profile": "localdev",
    "Region": "eu-west-1"
  }

This doesn't seem to get picked up at all which means I can't access the same resources as my other AWSSDK client because I have a role attached to that profile.

Thanks,

bcuff commented 4 years ago

Thanks for reporting this issue. I'll take a look at it soon.

bcuff commented 4 years ago

Hey, so it looks like you're using AWSOptions from IConfiguration to create your SDK clients. I added a constructor in 7.0.3: AwsHttpConnection(AWSOptions options). This should resolve your issue.

bcuff commented 4 years ago

I'm going to assume this issue is resolved since I haven't heard back from you.