I have audio files stored at Amazon S3 which are accessed from a web based music player app and also from mobile apps. Even non signed in users should be able to access the music. However i dont want people to use the link to download the content. Can this be accomplished in s3 ?
Thank You
Just disable public access to your bucket. Develop your web site to it only streams video content from an Amazon S3 bucket and does not support downloading the video.
The best way to protect your mp3 audio files from downloading is by setting up a reverse proxy. A reverse proxy server can be customized to a great extent to set access control to your media to protect mp3 audio files from downloading (or audio file copying).
You can configure any access point to accept requests only from a virtual private cloud (VPC) to restrict Amazon S3 data access to a private network. You can also configure custom block public access settings for each access point.
You can restrict access based on the HTTP referrer. It's not bulletproof (Referrer can be spoofed) but it will stop casual downloads.
You use a bucket policy to restrict the possible values for Referrer.
There's an example on this page (scroll down a bit) http://docs.aws.amazon.com/AmazonS3/latest/dev/AccessPolicyLanguage_UseCases_s3_a.html
Here's their example:
{
"Version":"2008-10-17",
"Id":"http referer policy example",
"Statement":[
{
"Sid":"Allow get requests originated from www.example.com and example.com",
"Effect":"Allow",
"Principal":"*",
"Action":"s3:GetObject",
"Resource":"arn:aws:s3:::examplebucket/*",
"Condition":{
"StringLike":{
"aws:Referer":[
"http://www.example.com/*",
"http://example.com/*"
]
}
}
}
]
}
You could also do signed URLs that expire - that would stop people from LINKING to your content from other site.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With