Skip to content

Instantly share code, notes, and snippets.

@alanwill
Created February 3, 2014 19:51
Show Gist options
  • Save alanwill/8791084 to your computer and use it in GitHub Desktop.
Save alanwill/8791084 to your computer and use it in GitHub Desktop.
AWS IAM policy that allows SSL read only access to a bucket. Good for log buckets.
{
"Statement": [
{
"Sid": "AllowGetLogs",
"Action": [
"s3:GetObject"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::myloggingbucket/logs/*",
"Condition": {
"Bool": {
"aws:SecureTransport": "true"
}
}
},
{
"Sid": "ConsoleAccess",
"Action": [
"s3:GetBucketLocation",
"s3:ListAllMyBuckets"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::*",
"Condition": {
"Bool": {
"aws:SecureTransport": "true"
}
}
},
{
"Sid": "AllowCliListBucket",
"Action": [
"s3:ListBucket"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::myloggingbucket",
"Condition": {
"Bool": {
"aws:SecureTransport": "true"
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment