我创建了一个新的存储桶 test1,它有两个上传和下载文件夹。以下是我附加给用户的策略。我使用带有访问和秘密访问密钥的 aws cli 进行连接,并成功地将文档上传到 s3://test1/upload/。当我尝试上传到 s3://test1/upload/ 文件夹时使用 cloudberry explorer 失败,出现 403 禁止错误。我正在使用相同的密钥连接到 aws cli 和 cloudberry,但不确定是什么导致了问题。任何人都可以帮忙解决这个问题。
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "s3:ListAllMyBuckets",
"Resource": "arn:aws:s3:::*",
"Effect": "Allow"
},
{
"Action": [
"s3:ListBucket",
"s3:GetBucketLocation"
],
"Resource": "arn:aws:s3:::test1",
"Effect": "Allow",
"Condition": {
"StringEquals": {
"s3:prefix": [
"",
"/",
"download/",
"download/*",
"upload/",
"upload/*"
]
}
}
},
{
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::test1/download/*",
"Effect": "Allow"
},
{
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject"
],
"Resource": "arn:aws:s3:::test1/upload/*",
"Effect": "Allow"
}
]
}