AWS Redshift Serverless with Redshift Spectrum

0

I have a Redshift Serverless with namespace and workgroup. I gave required permissions to access S3 and Glue etc

I was successfully able to create Redshift external schemas using query:

create external schema spectrum_xxx
from data catalog
database 'xxx'
iam_role 'xxx';

when i try to query the data , I get error.

select * 
from spectrum_xxx.customer_xxx
limit 10;

error: ERROR: exception name : UnauthorizedException, error type : 135, message: The requested role xxx is not associated to cluster, should retry : 0 Detail: ----------------------------------------------- error: exception name : UnauthorizedException, error type : 135, message: The requested role xxx is not associated to cluster, should retry : 0 code: 30000 context: query: 0 location: xen_aws_credentials_mgr.cpp:440 process: padbmaster [pid=2] ----------------------------------------------- [ErrorId: 12345]

Can anyone give me some light into this?

thanks

已提问 1 年前788 查看次数
2 回答
1
已接受的回答

In the serverless workgroup configuration, in the Permissions you need to add the role you use for S3 to the list of Associated IAM roles

profile pictureAWS
专家
已回答 1 年前
1

To further expand on my colleague’s response, you can associate the role with the IAM cluster via the console. Navigate to the cluster you want to update and select Actions -> Manage IAM Roles. Specify the role to associate from the list or by directly adding the ARN.

Reference https://docs.aws.amazon.com/redshift/latest/dg/c-getting-started-using-spectrum-add-role.html

已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则