0
我想使用AWS機器學習SDK創建數據源。起初,我要將csv數據文件上傳到S3存儲中,也就是SDK。然後我更新這個文件的桶策略。畢竟只有我試圖創建數據源,但我收到錯誤:Cretae Datasourse機器學習AWS通過SDK
故障(1):您沒有權限訪問「S3://training-data/input/test-likes.csv」 。聯繫's3://training-data/input/test-likes.csv'的所有者以獲取讀取權限。
需要什麼權限?
這是我的鬥政策:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AmazonML_s3:ListBucket",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::831986290820:user/pavel.emsow",
"Service": "machinelearning.amazonaws.com"
},
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::trainig-data",
"Condition": {
"StringLike": {
"s3:prefix": [
"input/common-likes.csv*",
"input/test-likes.csv*"
]
}
}
},
{
"Sid": "AmazonML_s3:GetObject",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::831986290820:user/pavel.emsow",
"Service": "machinelearning.amazonaws.com"
},
"Action": "s3:GetObject",
"Resource": [
"arn:aws:s3:::trainig-data/input/common-likes.csv*",
"arn:aws:s3:::trainig-data/input/test-likes.csv*"
]
}
]
}
我會添加動作「s3:ListBucket」。如果您使用Web界面添加輸入數據,則可以爲您修改策略。這至少可以讓你看到它做了什麼,所以你可以回溯並以正確的方式去做! –
「s3:ListBucket」已經存在。這是數組中的第一條語句。 –