Created
February 3, 2014 19:51
-
-
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.
This file contains 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
{ | |
"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