'Non guessable CloudFront URL

I'm wondering if there's a way to make the S3 path unguessable.

Let's suppose I have an S3 path like this: https://s3-bucket.com/singer/album/song/song.mp3, this file will be served through CloudFront, so the path will be: https://cloundfront-dist-id.com/singer/album/song/song.mp3?signature=... (I'm using signed URLs). My question is : it is possible to make the /singer/album/song/song.mp3 not guessable by hashing it using for example Lambda or Lambda@Edge function so the client will see a url like this https://cloundfront-dist-id.com/some_hash?signature=... (same as Spotify)?

Thanks in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source