Skip to content

Instantly share code, notes, and snippets.

@tonyfraser
Last active June 21, 2019 16:01
Show Gist options
  • Save tonyfraser/77f26b55d5d45dfb084c47ef31a54fe7 to your computer and use it in GitHub Desktop.
Save tonyfraser/77f26b55d5d45dfb084c47ef31a54fe7 to your computer and use it in GitHub Desktop.
A read only s3 permissions policy. think s3://outbounddrops/client-name, where you give
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"s3:ListAllMyBuckets",
"s3:GetBucketLocation"
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::*"
]
},
{
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::{bucket}",
"Condition": {
"StringLike": {
"s3:prefix": [
"",
"{key}",
"{key}/*"
]
}
}
},
{
"Action": [
"s3:GetObject"
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::{bucket}/{key}",
"arn:aws:s3:::{bucket}/{key}/*"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment