Created
June 1, 2013 09:00
-
-
Save sumardi/5689747 to your computer and use it in GitHub Desktop.
AWS S3 Sample Policy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2008-10-17", | |
"Id": "my-id", | |
"Statement": [ | |
{ | |
"Sid": "Allow get requests to specific referrers", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "*" | |
}, | |
"Action": "s3:GetObject", | |
"Resource": "arn:aws:s3:::bucketname/*", | |
"Condition": { | |
"StringLike": { | |
"aws:Referer": "http://sitename.com/" | |
} | |
} | |
}, | |
{ | |
"Sid": "Allow CloudFront get requests", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "arn:aws:iam::amazonaccountid:root" | |
}, | |
"Action": "s3:GetObject", | |
"Resource": "arn:aws:s3:::bucketname/*" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment