How to create a Redshift Spectrum external schema

From Redshift usually as a superuser issue this create external schema sql:

--Creating external schema
create external schema myspectrum_schema 
from data catalog database 'myspectrum_db'
iam_role 'arn:aws:iam::123456789999:role/myspectrum_role'
create external database if not exists;

The role specified above (in this case myspectrum_role) must have s3 full read permissions like (AmazonS3ReadOnlyAccess) on the bucket containing the data you want to reference in Redshift Spectrum, and must have glue permissions like (AWSGlueConsoleFullAccess).

And the role must be associated with the Redshift cluster before running the “create external schema” command.

Scroll to Top