首页 > 解决方案 > 无法为 Amazon Redshift Spectrum 创建外部架构

问题描述

尝试按照https://docs.aws.amazon.com/redshift/latest/dg/c-getting-started-using-spectrum.html通过 athena 从 redshift 查询 s3 使用情况。

尝试在步骤 3 中创建架构时遇到错误:

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

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

关于我为什么遇到这个或如何解决它的任何建议?

标签: amazon-redshiftamazon-athenaamazon-redshift-spectrum

解决方案


事实证明,您需要向集群所有者授予 AthenaFullAccess 和 S3ReadOnlyAccess 权限,而不仅仅是您登录 redshift 的角色


推荐阅读