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

preguntada hace un año789 visualizaciones
2 Respuestas
1
Respuesta aceptada

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
EXPERTO
respondido hace un año
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

respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas