# S3 authentication by AIM role

**URL:** <https://community.dremio.com/t/s3-authentication-by-aim-role/4256>\
**Category:** Uncategorized\
**Created:** [October 4, 2019, 9:45am UTC](https://community.dremio.com/t/s3-authentication-by-aim-role/4256 "2019-10-04T09:45:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaniOT](https://avatars.discourse-cdn.com/v4/letter/d/f14d63/32.png) [@DaniOT](https://community.dremio.com/u/DaniOT)\
**Post date:** [October 4, 2019, 9:45am UTC](https://community.dremio.com/t/s3-authentication-by-aim-role/4256/1 "2019-10-04T09:45:39Z")

</div>

Hi,  
From my AWS EC2 i have an AIM role which provides s3 access on machine level.  
This works great from local AWS CLI.

The source gets added, but when trying to access i get:  
[qtp1274672203-137] ERROR c.d.d.server.GenericExceptionMapper - Unexpected exception when processing GET [http://localhost:9047/apiv2/source/](http://localhost:9047/apiv2/source/)/folder/?nocache=1570177566465 : com.amazonaws.services.s3.model.AmazonS3Exception: Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID:; S3 Extended Request ID: )

Config: No Auth, Public bucket added:

Adding keys is not an option.

I had tried adding the IAM Role to “IAM Role to Assume” - alas as the machine itself has access so i’m not sure why we’d need it  
(Btw, you need to put the ARN here, but this is only from the logs, gj on the documentation and the help text 😱 )

This generates is not authorised to perform: sts:AssumeRole - Again, why not use the the default mechanism?

How to solve this?  
Thanks  
Dani

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [October 4, 2019, 5:59pm UTC](https://community.dremio.com/t/s3-authentication-by-aim-role/4256/2 "2019-10-04T17:59:37Z")

</div>

@DaniOT

This is an exception coming from the S3 and below are possible reasons. Any chance you can go through them and see if something was missed?

[https://aws.amazon.com/premiumsupport/knowledge-center/s3-troubleshoot-403/](https://aws.amazon.com/premiumsupport/knowledge-center/s3-troubleshoot-403/)

---

<div class="post-metadata">

**Author:** ![DaniOT](https://avatars.discourse-cdn.com/v4/letter/d/f14d63/32.png) [@DaniOT](https://community.dremio.com/u/DaniOT)\
**Post date:** [October 8, 2019, 11:57am UTC](https://community.dremio.com/t/s3-authentication-by-aim-role/4256/3 "2019-10-08T11:57:01Z")

</div>

@balaji.ramaswamy  
Thanks!

The issue is Dremio specific, the host has full access to s3, aws cli works perfectly using the IAM role.

I had double checked with the document you suggested.

Could you please tag a dremio developer on this to shed some details how this is implemented?

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [October 8, 2019, 4:57pm UTC](https://community.dremio.com/t/s3-authentication-by-aim-role/4256/4 "2019-10-08T16:57:20Z")

</div>

@DaniOT

Want to check the full stack and where it is failing. Can you please try it again and send server.log?

Thanks  
@balaji.ramaswamy

---

<div class="post-metadata">

**Author:** ![chafidz](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/chafidz/32/1267_2.png) [@chafidz](https://community.dremio.com/u/chafidz)\
**Post date:** [October 9, 2019, 10:42am UTC](https://community.dremio.com/t/s3-authentication-by-aim-role/4256/5 "2019-10-09T10:42:44Z")

</div>

here are some IAM policies i’ve tried for Dremio to read to one of our bucket via EC2 Metadata. They may overcompensated, but works.

> “s3:GetBucketPublicAccessBlock”,  
> “s3:GetObjectAcl”,  
> “s3:GetObject”,  
> “s3:GetObjectTorrent”,  
> “s3:GetObjectTagging”,  
> “s3:ListBucket”,  
> “s3:GetBucketAcl”,  
> “s3:GetBucketLocation”,  
> “s3:GetBucketPolicy”

---

<div class="post-metadata">

**Author:** ![chesterxgchen](https://avatars.discourse-cdn.com/v4/letter/c/5fc32e/32.png) [@chesterxgchen](https://community.dremio.com/u/chesterxgchen)\
**Post date:** [July 31, 2020, 4:05am UTC](https://community.dremio.com/t/s3-authentication-by-aim-role/4256/6 "2020-07-31T04:05:31Z")

</div>

I just got the same error today with latest release 4.6.1  
User: arn:aws:sts::xxx:assumed-role/xxx/xxxx is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::xxxx:role/dse-edge-dev (Service: Sts, Status Code: 403, Request ID: xxxx)

This the “AssumeRole” required. The documentation did not specify this role.

This is Dremio specific. This row has no problem access to the S3 bucket, and we have been using it for several years from both CLI and others.

---

<div class="post-metadata">

**Author:** ![mendeel](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/mendeel/32/2636_2.png) [@mendeel](https://community.dremio.com/u/mendeel)\
**Post date:** [August 11, 2020, 3:11am UTC](https://community.dremio.com/t/s3-authentication-by-aim-role/4256/7 "2020-08-11T03:11:30Z")

</div>

The action “sts:AssumeRole” means that the service that is trying to use the role is not authorized to use it. It’s a configuration on IAM that you need to enable trusted services to use the role, probably enable EC2 to assume the role you created.
