0
在S3中,我有一個名爲customerdata
的存儲桶。在此,我想對每一位客戶的文件夾,所以爲單個客戶提供文件夾訪問
/customerdata/bobjones/project1/data
/customerdata/jamessmith/project1/data
我需要提供每個客戶只能訪問自己的文件夾,並在其中的數據,最好用像雲莓S3探險一個簡單的免費工具。目標是讓Bob Jones登錄到cloudberry,並查看bobjones
文件夾中的數據。
到目前爲止,我只能夠在桶中展示鮑勃的一切,或者什麼都沒有。下面是我試圖建立的政策,下面this article,this one和this one:
{
"Version":"2012-10-17",
"Statement": [
{
"Sid": "AllowUserToSeeBucketListInTheConsole",
"Action": ["s3:ListAllMyBuckets", "s3:GetBucketLocation"],
"Effect": "Allow",
"Resource": ["arn:aws:s3:::*"],
"Condition":{"StringEquals":{"s3:prefix":["","customerdata/"],"s3:delimiter":["/"]}}
},
{
"Sid": "AllowRootAndHomeListingOfCompanyBucket",
"Action": ["s3:ListBucket"],
"Effect": "Allow",
"Resource": ["arn:aws:s3:::customerdata"],
"Condition":{"StringEquals":{"s3:prefix":["","bobjones/"],"s3:delimiter":["/"]}}
},
{
"Sid": "AllowListingOfUserFolder",
"Action": ["s3:ListBucket"],
"Effect": "Allow",
"Resource": ["arn:aws:s3:::customerdata"],
"Condition":{"StringLike":{"s3:prefix":["bobjones/*"]}}
},
{
"Sid": "AllowAllS3ActionsInUserFolder",
"Effect": "Allow",
"Action": ["s3:*"],
"Resource": ["arn:aws:s3:::customerdata/bobjones/*"]
}
]
}
我在做什麼錯?這是甚至可能是我想要做的?我也嘗試了第一種方法,並在cloudberry中看不到任何東西。
如果這不是正確的方法,那麼設置這種方法的正確方法是什麼,以便每個客戶只看到他們的項目和數據?