Skip to content

Instantly share code, notes, and snippets.

@karen-kua
Created June 14, 2020 21:30
Show Gist options
  • Select an option

  • Save karen-kua/6a2303c1ce6e715eb3e32e98e2ed169c to your computer and use it in GitHub Desktop.

Select an option

Save karen-kua/6a2303c1ce6e715eb3e32e98e2ed169c to your computer and use it in GitHub Desktop.
AWS referer s3 bucket policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Allow get requests originating from example.com and *.example.com",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::example.com/*",
"Condition": {
"StringLike": {
"aws:Referer": [
"http://example.com/*",
"http://*.example.com/*"
]
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment