jeudi 16 avril 2015

Access only lower level files and folders of the bucket? AWS user policy

I want to give access to some level to the users, i have a bucket and have folder folder_one/folder_two inside the bucket.


folder_two is inside folder_one i want to write the policy so that the users can list, upload and download this low level bucket folder.


users cannot have access to list, upload and download folder_one but folder_two and its contents can be listed ,download and upload.



{
"Version": "2012-10-17",
"Statement": [
{
"Action": ["s3:ListBucket"],
"Effect": "Allow",
"Resource": ["arn:aws:s3:::mybucket1/folder_one/folder_two"]
},
{
"Action": [
"s3:GetObject",
"s3:PutObject"
],
"Effect": "Allow",
"Resource": ["arn:aws:s3:::mybucket1/folder_one/folder_two"]
}
]
}


I tried above code but didn't work.





Aucun commentaire:

Enregistrer un commentaire