【发布时间】:2019-12-26 03:05:38
【问题描述】:
我正在尝试在 S3 存储桶上使用 AWS Glue 爬虫来填充 Glue 数据库。我运行 Create Crawler 向导,选择我的数据源(带有 avro 文件的 S3 存储桶),让它创建 IAM 角色并运行它,我收到以下错误:
Database does not exist or principal is not authorized to create tables. (Database name: zzz-db, Table name: avroavro_all) (Service: AWSGlue; Status Code: 400; Error Code: AccessDeniedException; Request ID: 78fc18e4-c383-11e9-a86f-736a16f57a42). For more information, see Setting up IAM Permissions in the Developer Guide (http://docs.aws.amazon.com/glue/latest/dg/getting-started-access.html).
我尝试在新的空白数据库中创建此表(与现有的带有表的数据库相反),尝试为名称添加前缀,尝试获取不同的架构,并尝试使用具有管理员访问权限的现有角色。我虽然后者可以工作,但我一直收到同样的错误,不知道为什么。
明确地说,我创建的服务角色有几个策略,我假设其前提条件足以创建表:
原木原木:
19:52:52
[10cb3191-9785-49dc-8935-fb02dcbd69a3] BENCHMARK : Running Start Crawl for Crawler avro
19:53:22
[10cb3191-9785-49dc-8935-fb02dcbd69a3] BENCHMARK : Classification complete, writing results to database zzz-db
19:53:22
[10cb3191-9785-49dc-8935-fb02dcbd69a3] INFO : Crawler configured with SchemaChangePolicy {"UpdateBehavior":"UPDATE_IN_DATABASE","DeleteBehavior":"DEPRECATE_IN_DATABASE"}.
19:53:34
[10cb3191-9785-49dc-8935-fb02dcbd69a3] ERROR : Insufficient Lake Formation permission(s) on s3://zzz-data/avro-all/ (Database name: zzz-db, Table name: avroavro_all) (Service: AWSGlue; Status Code: 400; Error Code: AccessDeniedException; Request ID: 31481e7e-c384-11e9-a6e1-e78dc8223fae). For more information, see Setting up IAM Permissions in the Developer Guide (http://docs.aws.amazon.com/glu
19:54:44
[10cb3191-9785-49dc-8935-fb02dcbd69a3] BENCHMARK : Crawler has finished running and is in state READY
【问题讨论】:
-
遇到同样的问题,正在解决。
-
我通过删除“数据湖位置”条目解决了问题。试试看。
-
你摇滚!就是这样。您想将此作为官方答案发布吗?
-
@yclian 提供的答案也帮助解决了我面临的同样问题。
-
@yclian 提供的答案也帮助了我。
标签: amazon-web-services amazon-athena aws-glue