Problem Description
When using the WP Offload Media plugin for WordPress to send your larger media files (like videos) to Amazon S3 storage, if you wish to configure S3 to not have your files publicly visible and only able to be viewed through your website, here's how.
Problem Resolution
In your Amazon S3 bucket settings, go to Permissions > Block all public access and set it to OFF. Turn all sub-settings ON, excluding: "Block public and cross-account access..." (which should be off)
Go to Permissions > Bucket Policy and insert the following:
{ "Version": "2012-10-17", "Id": "http referer policy example", "Statement": [{ "Sid": "Allow get requests originating from mywebsite.com.", "Effect": "Allow", "Principal": "", "Action": [ "s3:GetObject", "s3:GetObjectVersion" ], "Resource": "arn:aws:s3:::my-bucket-name-here/ ", "Condition": { "StringLike": {"aws:Referer": "mywebsite.com/*"} } }] }