# AWS IAM Role with self hosted ELK

**URL:** <https://discuss.elastic.co/t/aws-iam-role-with-self-hosted-elk/225065>\
**Category:** Elasticsearch\
**Created:** [March 25, 2020, 8:46pm UTC](https://discuss.elastic.co/t/aws-iam-role-with-self-hosted-elk/225065 "2020-03-25T20:46:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_f](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kevin_f/32/72456_2.png) [@Kevin\_f](https://discuss.elastic.co/u/Kevin_f)\
**Post date:** [March 25, 2020, 8:46pm UTC](https://discuss.elastic.co/t/aws-iam-role-with-self-hosted-elk/225065/1 "2020-03-25T20:46:00Z")

</div>

Hello,

I am trying to figure out if anyone has managed to get to use AWS IAM roles for their self hosted ELK stack rather than using IAM users (Access Key and Secret keys).

Scenario is:  
-\> Mulitple AWS accounts contain iam users for s3 buckets (logs),  
-\> Logstash instance is hosted on a AWS account peered to all the multiple accounts  
-\> Each iam user access key in all the multiple accounts has to be rotated every 90 days as part of security standards. This is time consuming and insecure as the credentials are shown in the logstash conf files

Recommendations:  
-\> Create IAM roles in the multiple accounts  
-\> But the question is, how can the logstash instance hosted in another account assume the role of multiple accounts?

Any ideas would be much appreciated. many thanks.

P.S. I came across this blog but seems like it is for AWS hosted ELK rather than self hosted ELK

> **[Setup a Logstash Server on AWS with IAM Auth to Elasticsearch](https://sysadmins.co.za/setup-a-logstash-server-for-amazon-elasticsearch-service-and-auth-with-iam/)**
>
> Authenticate Requests through Logstash to Elasticsearch with AWS IAM. Tutorial on setting up a Logstash Server on EC2

Regards,  
Kev

---

<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:** [April 22, 2020, 8:48pm UTC](https://discuss.elastic.co/t/aws-iam-role-with-self-hosted-elk/225065/2 "2020-04-22T20:48:08Z")

</div>

Closed on April 22, 2020, 8:48pm UTC

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