In order to make S3 resources only accessible on my website, I can use this S3 policy:
{
"Version":"2012-10-17",
"Id":"http referer policy example",
"Statement":[
{
"Sid":"Allow get requests originating from www.example.com and example.com.",
"Effect":"Allow",
"Principal":"*",
"Action":["s3:GetObject","s3:GetObjectVersion"],
"Resource":"arn:aws:s3:::DOC-EXAMPLE-BUCKET/*",
"Condition":{
"StringLike":{"aws:Referer":["http://www.example.com/*","http://example.com/*"]}
}
}
]
}
However, according to the documentation:

The purpose of this policy is more like "Preventing third-party websites from accessing the content" rather than "absolutely preventing anyone from accessing the S3 data" since the policy is based on "aws:Referer" and that can be spoofed (See image above).
So how do I really ensure the S3 resources are absolutely only accessible on my website and no unauthorized party can access them?
Note: My website is hosted on AWS EC2.