无法为Amazon Redshift Spectrum创建外部架构

时间:2019-03-19 17:30:36

标签: amazon-redshift amazon-athena amazon-redshift-spectrum

尝试遵循https://docs.aws.amazon.com/redshift/latest/dg/c-getting-started-using-spectrum.html通过雅典娜从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;"

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

1 个答案:

答案 0 :(得分:0)

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