0
votes

Trying to follow the https://docs.aws.amazon.com/redshift/latest/dg/c-getting-started-using-spectrum.html to query s3 usage from redshift via athena.

Running into an error when attempting to create schema in Step 3:

"create external schema athena_schema from data catalog 
database 'sampledb' 
iam_role 'arn:aws:iam::<>:role/MySpectrumRole' 
region 'us-east-1';"

Error: "line 1:8: no viable alternative at input 'create external' (service: amazonathena; status code: 400; error code: invalidrequestexception;"

Any suggestions on why I run into this or how to resolve it?

1
I highly recommend you use the Glue catalog and not the legacy Athena catalog. - Nathan Griffiths

1 Answers

0
votes

Turns out you need to give permissions to the cluster owner for AthenaFullAccess and S3ReadOnlyAccess not just the role you are logging into redshift as