Amazon S3 Streaming From Single URL Only

2 replies
Hi,

I am looking to stream an MP3 from Amazon S3, but I would only like 1 specific URL I specify to have access to stream it.

If someone attempts to stream the MP3 from another URL, it should fail. And downloading the MP3 should be prohibited.

Can someone supply some instruction for this?

Thanks!
#amazon #single #streaming #url
  • Profile picture of the author David V
    First, when you upload the mp3 to your bucket, it will only be accessible from one url anyway.

    If you really mean that you want to limit it to your site so other people can't hotlink it, then you'll need to ensure the ACL is not public and you have a bucket policy to limit the availability only to your site url or ip.

    You can also use a CNAME so your url could be something like "mp3assets.mysite.com"

    One of the better apps for accessing and doing all kinds of things with Amazon is Cloudberry Explorer.
    It's only for windows so if your on a Mac, run vmware fusion or parallels so you can run a windows app.
    There is Bucket Explorer for Mac, but I personally don't care for it as much as Cloudberry.

    I point these out because there are things you can do with these apps that you cannot do in the Amazon dashboard without having to write code.

    There's no truly bulletproof way to block people from getting the mp3, but you can use expiring urls, the correct http headers, and correct mime-type / content-type to limit having issues.

    A full on tutorial is a little too much to post in this forum but a google search should yield you some good tutorials.
    Just pay attention to:
    ACL
    Bucket policy
    Mime-type / content-type
    Expiring url's
    {{ DiscussionBoard.errors[9978165].message }}
  • Profile picture of the author MaybeImYou
    David D is spot on

    What language are you using to process this transaction? S3 has a lot of libraries to suit this exact need.
    {{ DiscussionBoard.errors[9989319].message }}

Trending Topics