質問編集履歴
4
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -64,3 +64,64 @@
|
|
64
64
|
#### AWS Lake Formation > Databases > db_sample_for_athena
|
65
65
|
db_sample_for_athena
|
66
66
|

|
67
|
+
|
68
|
+
|
69
|
+
## 3月4日15時40分追記
|
70
|
+
エラーコード
|
71
|
+
```
|
72
|
+
"errorCode":"AccessDenied",
|
73
|
+
"errorMessage":"User: arn:aws:sts::アカウントID:assumed-role/AWSServiceRoleForLakeFormationDataAccess/AWSLF-00-AT-アカウントID-OSSm3ywcAP is not authorized to perform: kms:Decrypt on resource: arn:aws:kms:ap-northeast-1:アカウントID:key/○○ because no resource-based policy allows the kms:Decrypt action"
|
74
|
+
```
|
75
|
+
|
76
|
+
クローラのサービスロールに AWSServiceRoleForLakeFormationDataAccessを設定しています
|
77
|
+

|
78
|
+
|
79
|
+
このロールに許可しているポリシーは以下のとおりです
|
80
|
+

|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
kms-decrypt-policy
|
85
|
+
```
|
86
|
+
{
|
87
|
+
"Version": "2012-10-17",
|
88
|
+
"Statement": [
|
89
|
+
{
|
90
|
+
"Sid": "VisualEditor0",
|
91
|
+
"Effect": "Allow",
|
92
|
+
"Action": "kms:Decrypt",
|
93
|
+
"Resource": "*"
|
94
|
+
}
|
95
|
+
]
|
96
|
+
}
|
97
|
+
```
|
98
|
+
LakeFormationGetPolicy
|
99
|
+
|
100
|
+
```
|
101
|
+
{
|
102
|
+
"Version": "2012-10-17",
|
103
|
+
"Statement": [
|
104
|
+
{
|
105
|
+
"Sid": "VisualEditor0",
|
106
|
+
"Effect": "Allow",
|
107
|
+
"Action": [
|
108
|
+
"lakeformation:GetResourceLFTags",
|
109
|
+
"lakeformation:GetDataAccess",
|
110
|
+
"lakeformation:ListLFTags",
|
111
|
+
"lakeformation:GetLFTag"
|
112
|
+
],
|
113
|
+
"Resource": "*"
|
114
|
+
}
|
115
|
+
]
|
116
|
+
}
|
117
|
+
```
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
3
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -49,3 +49,18 @@
|
|
49
49
|
]
|
50
50
|
}
|
51
51
|
```
|
52
|
+
|
53
|
+
## 3月4日8時10分追記
|
54
|
+
|
55
|
+
#### LF-Tags
|
56
|
+

|
57
|
+
|
58
|
+
|
59
|
+
#### AWS Lake Formation > Grant permissions > Grant data permissions
|
60
|
+

|
61
|
+
|
62
|
+

|
63
|
+
|
64
|
+
#### AWS Lake Formation > Databases > db_sample_for_athena
|
65
|
+
db_sample_for_athena
|
66
|
+

|
2
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -21,7 +21,31 @@
|
|
21
21
|
アタッチ済のポリシー
|
22
22
|
AmazonAthenaFullAccess
|
23
23
|
AmazonS3FullAccess
|
24
|
+
KMSFullAccessPolicyを作成してアタッチ
|
24
25
|
|
25
26
|
#### Lake Formation > Permissions
|
26
27
|

|
27
28
|
|
29
|
+
|
30
|
+
#### クロスアカウントクエリに必要なアクセス許可を持つ Amazon S3 バケットポリシーをアタッチ済
|
31
|
+
```
|
32
|
+
{
|
33
|
+
"Version": "2012-10-17",
|
34
|
+
"Statement": [
|
35
|
+
{
|
36
|
+
"Sid": "Stmt1620692932186",
|
37
|
+
"Effect": "Allow",
|
38
|
+
"Principal": {
|
39
|
+
"AWS": "arn:aws:iam::○○:user/datalake_user"
|
40
|
+
},
|
41
|
+
"Action": [
|
42
|
+
"s3:*"
|
43
|
+
],
|
44
|
+
"Resource": [
|
45
|
+
"arn:aws:s3:::○○",
|
46
|
+
"arn:aws:s3:::○○/○○/○○/*"
|
47
|
+
]
|
48
|
+
}
|
49
|
+
]
|
50
|
+
}
|
51
|
+
```
|
1
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
## 実現したいこと
|
2
2
|
AWS AthenaでSELECT文を実行したいのですが、下記エラーが出ています。
|
3
|
+
Glueのクロールは成功して、DBは作成しています。
|
4
|
+
また、DDLを表示することもできています。
|
3
5
|
なにか気づいた点がありましたら、教えていただければ幸いです。
|
4
6
|
```
|
5
7
|
SELECT * FROM "DB名"."テーブル名" limit 10;
|