Restricting access to files on Amazon S3 on per-file basis

amazon s3

I have an interesting requirement: There's various files on the same S3 Bucket. The task is to restrict access to the files on a per-file basis using usernames and passwords.

I tried using an FTP server and s3fs for the job but the connection time is way too long. I know s3auth.com can be used to restrict access to the entire bucket, but i need to restrict access to each file (Only one randomly generated username has access to any particular file)

Best Answer

Use S3 ACLs. They're object (aka file) based.

ACLs are resource-based access policies that grant access permissions to buckets and objects. For more information about managing access permissions with resource-based policies, see Overview of Managing Access in the Amazon Simple Storage Service Developer Guide.