SNOWFLAKE SQL execution error: Error assuming AWS_ROLE. Please verify the role and externalId are configured correctly in your AWS policy.

Vidit tyagi
2 min readJan 24, 2022

--

snowflake aws s3 inetgration
Snowflake — AWS S3 Integration

I am writing this blog just to help those techies who normally face the above error and sometimes get stuck in between. So, while you are following the Snowflake documentation to set up the integration with AWS S3 and this issue normally comes and once you create the storage integration with S3, you would use the below commands to get the USER ARN and External ID and both must be exactly matched with AWS Role Trust Policies.

Now go to AWS Console → Users → Open the Trust Relationship and Edit, if your snowflake user is different from who created the storage integration (Accountadmin mostly) then allow to another user use StringLike instead of StringEquals and *_* symbols to allow them. This is the silly mistake we mostly forget to correct 😊

Once you save the User, it will look like the screen below:

I hope this will resolve your issue.

If you are still facing the issue, please write to me in the comment box, I will try to help you :)

happy learning 😊

--

--

Vidit tyagi
Vidit tyagi

Written by Vidit tyagi

A data scientist in cloud data warehouse

Responses (1)