Search code examples
amazon-s3bucket

How is security done at folder level within a single bucket in aws s3?


I am very naive at AWS s3. Recently, we have a requirement of using the AWS s3 bucket for storing big files. I wanted to know, How do we do security at folder level within a single bucket in s3? Do S3 takes care of that? If yes, by what means? I understand that. they do encryption and decryption of data, but that does not suffice. We are a service provider, where multiple tenants would be using the same bucket. How folder within AWS bucket can be isolated with security? For one bucket there will be single access-key, but what about a folder in a bucket?


Solution

  • You should use a bucket policy to restrict/Allow user access to the folder. You can do this using the S3 Console or you can assign an IAM role to the user. Please take a look at the link for more details.

    https://aws.amazon.com/blogs/security/writing-iam-policies-grant-access-to-user-specific-folders-in-an-amazon-s3-bucket/