# Nest authentication with IAM

**URL:** <https://discuss.elastic.co/t/nest-authentication-with-iam/218866>\
**Category:** Elasticsearch\
**Created:** [February 11, 2020, 9:51pm UTC](https://discuss.elastic.co/t/nest-authentication-with-iam/218866 "2020-02-11T21:51:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Greenwell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_greenwell/32/62482_2.png) [@David\_Greenwell](https://discuss.elastic.co/u/David_Greenwell)\
**Post date:** [February 11, 2020, 9:51pm UTC](https://discuss.elastic.co/t/nest-authentication-with-iam/218866/1 "2020-02-11T21:51:03Z")

</div>

Is there a way to connect to an AWS elasticsearch pool that is set up with an IAM role/user but still be able to use the NEST api for C#? Are there any other utilites to do this in C#?

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [February 12, 2020, 12:35am UTC](https://discuss.elastic.co/t/nest-authentication-with-iam/218866/2 "2020-02-12T00:35:51Z")

</div>

I don't know how authentication works for an AWS Elasticsearch pool, but NEST allows you to [implement your own `IConnection`](https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/modifying-default-connection.html), so you could write a custom authentication mechanism.

---

<div class="post-metadata">

**Author:** ![David\_Greenwell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/david_greenwell/32/62482_2.png) [@David\_Greenwell](https://discuss.elastic.co/u/David_Greenwell)\
**Post date:** [February 12, 2020, 6:36pm UTC](https://discuss.elastic.co/t/nest-authentication-with-iam/218866/3 "2020-02-12T18:36:19Z")

</div>

I will take a look at doing that. Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 11, 2020, 6:36pm UTC](https://discuss.elastic.co/t/nest-authentication-with-iam/218866/4 "2020-03-11T18:36:25Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
