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

Added support for instance profile credentials #3

Closed ghost closed 8 years ago

ghost commented 8 years ago

Some organizations (like mine!) do not allow devs to use Access Keys, so I've added support for Instance Profile Credentials.

The AWS SDK supports these, so I had a look at how they do it - basically they call a special URL at runtime to get a temporary Access Key, Secret Key and Token, and proceed as normal from there.

The key does expire eventually, so there is checking to ensure that a "fresh" set of credentials is always available.

bcuff commented 8 years ago

Thanks for the contrib! This looks like a very useful feature. I'll take a closer look at this when I have more time. For now I left a few minor comments.

ghost commented 8 years ago

Very good comments, I've made the fixes suggested.

bcuff commented 8 years ago

Cool. Merged & published to nuget.