Last active
June 14, 2018 03:20
-
-
Save colemanja91/ec178edc4b21034a5a9f078381971648 to your computer and use it in GitHub Desktop.
Sample Athena Results S3 Policy for Restricted Data
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": "2012-10-17", | |
"Id": "Policy1523289797898", | |
"Statement": [ | |
{ | |
"Sid": "DenyRestrictedResultsAccess", | |
"Effect": "Deny", | |
"NotPrincipal": { | |
"AWS": [ | |
"arn:aws:iam::{{ aws_account_id }}:user/{{ aws_user_name }}" | |
] | |
}, | |
"Action": "s3:GetObject", | |
"Resource": "arn:aws:s3:::aws-athena-query-results-{{ aws_account_id }}-us-east-1/*", | |
"Condition": { | |
"StringEquals": { | |
"s3:ExistingObjectTag/restriced_data": "True" | |
} | |
} | |
}, | |
{ | |
"Sid": "DenyPolicyUpdates", | |
"Effect": "Deny", | |
"NotPrincipal": { | |
"AWS": [ | |
"arn:aws:iam::{{ aws_account_id }}:user/{{ aws_user_name }}" | |
] | |
}, | |
"Action": "s3:PutBucketPolicy", | |
"Resource": "arn:aws:s3:::aws-athena-query-results-{{ aws_account_id }}-us-east-1" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment