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

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

Answers:  Once you created the storage integration, you would use the below commands to get the USER ARN and External ID and both must exact match in 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 to allow to another user use StringLike instead of StringEquals and *_* symbols to allow them. This is silly mistake we mostly forget to correct 😊




Once you saved the User, It will look like the below screen:
 





I hope this will resolve your issue 😊
If you still facing the issue, please write to me in comment box, i will try to help you :)







Comments

Popular posts from this blog

error_on_column_count_mismatch=false : Number of columns in file does not match that of the corresponding table use file format option error_on_column_count_mismatch=false to ignore this error File

Snowflake Automation using SnowSql CLI || Create Azure Devops CI CD using Snowsql CLI

Practice Set 1: Snowpro Certification Practice Set with more than 250 Unique Questions