# How to use S3 Input Plugin with assume role\_arn

**URL:** <https://discuss.elastic.co/t/how-to-use-s3-input-plugin-with-assume-role-arn/256248>\
**Category:** Logstash\
**Created:** [November 22, 2020, 1:52am UTC](https://discuss.elastic.co/t/how-to-use-s3-input-plugin-with-assume-role-arn/256248 "2020-11-22T01:52:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![niraj\_kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/niraj_kumar/32/4130_2.png) [@niraj\_kumar](https://discuss.elastic.co/u/niraj_kumar)\
**Post date:** [November 22, 2020, 1:52am UTC](https://discuss.elastic.co/t/how-to-use-s3-input-plugin-with-assume-role-arn/256248/1 "2020-11-22T01:52:08Z")

</div>

Hi,

I am trying to find a way to use the S3 input plugin to ingest AWS Cloudtrail data. I have the config working but the way I am doing doesn't seem to be streamlined. So this is how I am able to make it work till now.

1. I export the AWS Access Key, Secret Key, and Region as environment variables. Something like  
`export AWS_ACCESS_KEY=xxxxxxxxxx`
2. Start logstash and specify the role\_arn that has access to my S3 objects.

This is working.

But what I really want is a way to use a nicer approach to use the .aws/credentials file and specify the role\_arn in my config to assume the role and the logstash should work.

But it seems like when I either use the access\_key and secret\_key parameter of the S3 input plugin along with role\_arn. It doesn't seem to work. I believe that the input plugging is trying to access my bucket using my access keys instead of the role\_arn. How can I achieve this?

Can someone help?

Also, can there be an option to specify Profiles. That would really be a very useful feature to the s3 input plugin. We use a lot of AWS CLI Profiles and having such a capability would be nice.

---

<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:** [December 20, 2020, 1:52am UTC](https://discuss.elastic.co/t/how-to-use-s3-input-plugin-with-assume-role-arn/256248/2 "2020-12-20T01:52:25Z")

</div>

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