• These policies are used to prevent files from being downloaded from a link, when activated it block offload S3 to connect from the site to the bucket, giving this error message:

    There was an error attempting to check the permissions of the bucket cdn.sample.com: Access Denied

    How to allow the site to connet to S3?

    {
        "Version": "2012-10-17",
        "Id": "http referer policy example",
        "Statement": [
            {
                "Sid": "Allow get requests referred by www.sample.com and sample.com.",
                "Effect": "Allow",
                "Principal": "*",
                "Action": "s3:GetObject",
                "Resource": "arn:aws:s3:::cdn.sample.com/*",
                "Condition": {
                    "StringLike": {
                        "aws:Referer": [
                            "https://www.sample.com/*",
                            "https://sample.com/*"
                        ]
                    }
                }
            },
            {
                "Sid": "Explicit deny to ensure requests are allowed only from specific referer.",
                "Effect": "Deny",
                "Principal": "*",
                "Action": "s3:*",
                "Resource": "arn:aws:s3:::cdn.sample.com/*",
                "Condition": {
                    "StringNotLike": {
                        "aws:Referer": [
                            "https://www.sample.com/*",
                            "https://sample.com/*"
                        ]
                    }
                }
            }
        ]
    }
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Issue with S3 policies’ is closed to new replies.