kmansoor
kmansoor

Reputation: 4345

Denying direct access to AWS S3 Object

In a web application scenario, html5 <video> tag is used as follows:

<video src="https://s3-us-west-2.amazonaws.com/mybucket/avideo.mp4">
  <source type="video/mp4">
    HTML5 Video is required
</video>

How can I stop somebody from directly accessing the video by copy-pasting https://s3-us-west-2.amazonaws.com/mybucket/avideo.mp4 in a browser URL bar?

Upvotes: 0

Views: 393

Answers (1)

Mark B
Mark B

Reputation: 201088

See the example on this page regarding restricting access to only requests that include a specific HTTP referrer.

Upvotes: 1

Related Questions