本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
先決條件
在 AWS Glue Data Catalog 中建立 S3 Tables 的聯合型錄之前,請確定您的 IAM 主體 (使用者或角色) 具有必要的許可。
所需的 IAM 許可
您的 IAM 主體需要下列許可才能啟用 S3 Tables 整合:
AWS Glue 許可:
glue:CreateCatalog–s3tablescatalog建立聯合目錄時需要glue:GetCatalog– 檢視目錄詳細資訊時需要glue:GetDatabase– 將 S3 命名空間檢視為資料庫時需要glue:GetTable– 檢視 S3 資料表時需要glue:passConnection– 授予呼叫委託人將aws:s3tables連線委派給 AWS Glue 服務的權利
S3 Tables 許可 (用於 IAM 存取控制):
s3tables:CreateTableBuckets3tables:GetTableBuckets3tables:CreateNamespaces3tables:GetNamespaces3tables:ListNamespacess3tables:CreateTables3tables:GetTables3tables:ListTabless3tables:UpdateTableMetadataLocations3tables:GetTableMetadataLocations3tables:GetTableDatas3tables:PutTableData
IAM 政策範例
下列 IAM 政策提供在 IAM 模式中啟用 S3 Tables 與 Data Catalog 整合所需的最低許可:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "GlueDataCatalogPermissions", "Effect": "Allow", "Action": [ "glue:CreateCatalog", "glue:GetCatalog", "glue:GetDatabase", "glue:GetTable" ], "Resource": [ "arn:aws:glue:region:account-id:catalog/s3tablescatalog", "arn:aws:glue:region:account-id:database/s3tablescatalog/*/*", "arn:aws:glue:region:account-id:table/s3tablescatalog/*/*/*" ] }, { "Sid": "S3TablesDataAccessPermissions", "Effect": "Allow", "Action": [ "s3tables:GetTableBucket", "s3tables:GetNamespace", "s3tables:GetTable", "s3tables:GetTableMetadataLocation", "s3tables:GetTableData" ], "Resource": [ "arn:aws:s3tables:region:account-id:bucket/*", "arn:aws:s3tables:region:account-id:bucket/*/table/*" ] } ] }