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

demandé il y a un an788 vues
2 réponses
1
Réponse acceptée

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
répondu il y a un an
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

répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions