How to make images hosted on Amazon S3 less public but not completely private?

Posted by Jay Godse on Stack Overflow See other posts from Stack Overflow or by Jay Godse
Published on 2010-03-31T00:57:56Z Indexed on 2010/03/31 1:03 UTC
Read the original article Hit count: 291

Filed under:
|
|
|
|

I fired up a sample application that uses Amazon S3 for image hosting. I managed to coax it into working. The application is hosted at github.com. The application lets you create users with a profile photo. When you upload the photo, the web application stores it on Amazon S3 instead of your local file system. (Very important if you host at heroku.com)

However, when I did a "view source" in the browser of the page I noticed that the URL of the picture was an Amazon S3 URL in the S3 bucket that I assigned to the app. I cut & pasted the URL and was able to view the picture in the same browser, and in in another browser in which I had no open sessions to my web app or to Amazon S3.

Is there any way that I could restrict access to that URL (and image) so that it is accessible only to browsers that are logged into my applications?

Most of the information I found about Amazon ACLs only talk about access for only the owner or to groups of users authenticated with Amazon or AmazonS3, or to everybody anonymously.

© Stack Overflow or respective owner

Related posts about amazon-s3

Related posts about acl