Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

129
Views
How To Prevent Image Hotlinking With Bucket Policy AWS S3

I'm trying to prevent hotlinking of images in my S3 bucket. I thought bucket policy this would work but so far no luck:

{
    "Version": "2008-10-17",
    "Id": "Bucket policy for example.com",
    "Statement": [
        {
            "Sid": "Allow GET requests referred by example.com",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::example/*",
            "Condition": {
                "StringLike": {
                    "aws:Referer": [
                        "https://www.example.com/*",
                        "http://www.example.com/*",
                        "https://example.com/*",
                        "http://example.com/*"
                    ]
                }
            }
        },
        {
            "Sid": "Allow GET requests that don't specify a referrer",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::example/*",
            "Condition": {
                "Null": {
                    "aws:Referer": true
                }
            }
        }
    ]
}

How do I make it so this policy denies access to images embedded on other websites?

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!