One scenario comes to mind:
When your music player application wants to play something, it should ask your backend for the MP3 URL. Your server can create URLs with the parameter "Expires" [1] set to 10 seconds in the future.
Thus, the URL returned by your server can only be used for 10 seconds, which should be more than enough for the music player to start downloading from S3.
Of course, the user can download the file if he sees the URL of some HTTP analyzer in a 10-second window and starts the download.
But there is no bulletproof way to protect the user from receiving his / her hands from the content that their device is accessing. If content is delivered to a device, there is always a way for enough technical staff to pick it up.
ps Just heads-up, if your MP3 player supports the search (especially by sending another HTTP range request), you will have to re-get the new URL with the updated "expires" parameter from your backend.
[1] http://s3.amazonaws.com/doc/s3-developer-guide/RESTAuthentication.html
joonas.fi
source share