# Fargate with logstash container consume iam role

**URL:** <https://discuss.elastic.co/t/fargate-with-logstash-container-consume-iam-role/264671>\
**Category:** Logstash\
**Created:** [February 18, 2021, 9:29am UTC](https://discuss.elastic.co/t/fargate-with-logstash-container-consume-iam-role/264671 "2021-02-18T09:29:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![J\_Kit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/j_kit/32/77810_2.png) [@J\_Kit](https://discuss.elastic.co/u/J_Kit)\
**Post date:** [February 18, 2021, 9:29am UTC](https://discuss.elastic.co/t/fargate-with-logstash-container-consume-iam-role/264671/1 "2021-02-18T09:29:56Z")

</div>

Hi

I tried to set up logstash in AWS ECS fargate and the logstash will read from the s3 bucket.

I configuring logstash input s3 with access\_key\_id =\> ''" secret\_access\_key =\> ''" and able to read s3 files successfully.

How do I configure fargate logstash (without EC2) to use the IAM role to avoid using access and secret key?

I tried to set it empty and set the ECS task role and task execution with sts:assumerole and all required permission but getting

```auto
Error: unable to sign request without credentials set
Exception: Aws::Errors::MissingCredentialsError

```

Any advice for this scenario

---

<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 18, 2021, 9:30am UTC](https://discuss.elastic.co/t/fargate-with-logstash-container-consume-iam-role/264671/2 "2021-03-18T09:30:10Z")

</div>

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