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

asked a year ago773 views
2 Answers
1
Accepted Answer

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
EXPERT
answered a year ago
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

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions