Created
February 12, 2022 02:13
-
-
Save ystoneman/b11327f1508dfdac51224f030ccc6be3 to your computer and use it in GitHub Desktop.
KMS Policy WIth Permissions for CloudWatch Logs
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
{ | |
"Id": "only-cloudwatch-logs", | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "Enable IAM User Permissions", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "arn:aws:iam::123456789012:root" | |
}, | |
"Action": "kms:*", | |
"Resource": "*" | |
}, | |
{ | |
"Effect": "Allow", | |
"Principal": { | |
"Service": "logs.us-east-1.amazonaws.com" | |
}, | |
"Action": [ | |
"kms:Encrypt*", | |
"kms:Decrypt*", | |
"kms:ReEncrypt*", | |
"kms:GenerateDataKey*", | |
"kms:Describe*" | |
], | |
"Resource": "*", | |
"Condition": { | |
"ArnEquals": { | |
"kms:EncryptionContext:aws:logs:arn": "arn:aws:logs:us-east-1:123456789012:log-group:awesome-logs" | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment