是否可以创建一个允许来自aws机器学习的读写访问的S3存储桶策略?我尝试了下面的存储桶策略,但没有工作。
存储桶政策:
{
"Version": "2008-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "machinelearning.amazonaws.com"
},
"Action": [
"s3:GetObject",
"s3:PutObject"
],
"Resource": "arn:aws:s3:::cxra/*"
},
{
"Effect": "Allow",
"Principal": {
"Service": "machinelearning.amazonaws.com"
},
"Action": "s3:PutObjectAcl",
"Resource": "arn:aws:s3:::cxra/*",
"Condition": {
"StringEquals": {
"s3:x-amz-acl": "bucket-owner-full-control"
}
}
},
{
"Effect": "Allow",
"Principal": {
"Service": "machinelearning.amazonaws.com"
},
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::cxra"
},
{
"Effect": "Allow",
"Principal": {
"Service": "machinelearning.amazonaws.com"
},
"Action": [
"s3:GetBucketLocation"
],
"Resource": "arn:aws:s3:::cxra"
}
]
}
答案 0 :(得分:0)
根据Granting Amazon ML Permissions to Output Predictions对Amazon S3和Granting Amazon ML Permissions to Read Your Data from Amazon S3
仔细检查您的政策由于它们被记录为两个单独的策略,我建议您遵循这一点,而不是在一个文档中加入这两个策略。排除故障会更容易。