Is there any kind of bucket policy or IAM policy which restricts the user in creation of folders. Ex. Let us consider i have an user – User1, i have provided access to the user to certain folder in the S3 bucket. I need to restrict the user in such a way, that the user can only upload and download the objects. The user should not even have access to create a folder. Can that be done? If it can be done, what should be added and where?(Bucket policy or IAM policy)
Question posted in Amazon Web Sevices
The official Amazon Web Services documentation can be found here.
The official Amazon Web Services documentation can be found here.
2
Answers
I have solved this on my own, I have a bucket policy which restricts users to only upload a certain type of file. So create folder does not work automatically. The bucket policy i used is mentioned below as reference.
}
There is no such thing as "folder" in S3, so you can’t prohibit creating something that does not exist. What you see in S3 console as "folder" is just a visual representation of S3 object keys that contain
/
in their name.