Skip to content

Instantly share code, notes, and snippets.

@hatchetation
Created January 30, 2014 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hatchetation/8720632 to your computer and use it in GitHub Desktop.
Save hatchetation/8720632 to your computer and use it in GitHub Desktop.
S3 - restricted bucket (by prefix) read-only template
{
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::{{bucket}}"
],
"Condition": {
"StringLike": {
"s3:prefix": "{{prefix}}/*"
}
}
},
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:GetObjectAcl",
"s3:GetObjectExtended",
"s3:GetObjectVersion"
],
"Resource": [
"arn:aws:s3:::{{bucket}}/{{prefix}}/",
"arn:aws:s3:::{{bucket}}/{{prefix}}/*"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment