Amazon S3 permissions by the domain

2019-08-12 23:49发布

问题:

The scenario:

  • Amazon S3 folder with private files
  • Goal: display videos on a HTML5 player, on a specific domain, without turning these files public (similar to vimeo allowing to embed a video only on a domain)

I already tried to change the bucket policy but without success!

回答1:

  1. You'll want to set these files to private.

  2. You'll want to use pre-signed URLs to get the correct authentication token that is required for you to view the files after they're set to private.

  3. If your player is web-based, you'll probably want to enable a CORS configuration.