I want to control who can download a file via an app (as if it was held on the local FS). What's the right approach for doing this, considering S3 can't be mounted as a POSIX compliant file system?
-
Read the S3 docs, ask again on stackoverflow. I am pretty sure there is some form of API that requires a cookie that you would set in an application. – Zoredache Oct 04 '11 at 20:55
-
http://aws.amazon.com/documentation/s3/ – Zoredache Oct 04 '11 at 20:56
2 Answers
You can mount S3 buckets as local filesystems using the s3fs software.
Make sure you use appropriate permissions on the bucket and files so that the public cannot access your files.
You could further control who has what type of access to which buckets using AWS IAM and distribute appropriate credentials for use with s3fs.
That said, it isn't clear that mounting as a file system is exactly what you need since you haven't expressed your original project requirements. "Downloading a file via an app" can be done with special URLs in S3 that include key signatures and even expiration times.

- 11,163
- 1
- 36
- 56
-
Sorry, I'm looking for a scalable data store for users to upload files but where we can easily control who sees what. Normally you would do this with a file handler in your app, but this would go back to a part of the fs which only the app would have access to, so it could control the streams on demand. Typically, an application like this would use a gluster-type or isilon-type filesystem because it is POSIX compliant, making this easy, but S3 is both cheaper and easier from a management perspective. – chrism2671 Oct 05 '11 at 07:51
S3 offers a number of different ways to control who sees what including: bucket policies, IAM, ACLs, and query strings. You aren't giving enough information about your application requirements to be able to recommend a specific approach, so I'd recommend studying the S3 documentation and figuring out which one works best for your situation.

- 11,163
- 1
- 36
- 56