能否强制Redshift对特定外部Schema不使用Lake Formation权限
解决方案
单Schema禁用Lake Formation(调试推荐)
创建外部Schema时显式添加lake_formation_enabled参数关闭Lake Formation鉴权即可,该配置仅作用于当前Schema,不会影响集群其他业务,修改后的建语句如下:
create external schema ruben_external from data catalog database 'ruben_external' region 'eu-north-1' iam_role 'arn:aws:iam::xxxxxxxx:role/ruben_redshift_external' create external database if not exists options (lake_formation_enabled 'false');
重建Schema和外部表后执行查询,即可验证权限问题来源。
全集群禁用Lake Formation
如果需要在Redshift实例层面全局关闭Lake Formation解析,可修改集群参数组:
- 找到集群关联的参数组,将
enable_lake_formation参数值设置为false - 重启集群后配置生效
问题根因说明
Lake Formation默认仅对Glue表LOCATION字段指向的路径签发临时访问凭证,你当前表的LOCATION是manifest文件本身,manifest内列出的其他Parquet文件所在的S3路径不在Lake Formation的授权范围内,所以会出现可读取manifest文件、但无法访问实际数据文件的现象。
内容的提问来源于stack exchange,提问作者RubenLaguna
相关产品推荐
相关产品推荐

