Last active
August 1, 2016 03:03
-
-
Save ryan-lane/9a9b164c53c91ff0790c48e87bab9ed8 to your computer and use it in GitHub Desktop.
Extended KMS authentication encrypt policy
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", | |
"Statement": [ | |
{ | |
"Action": [ | |
"lambda:Invoke*" | |
], | |
"Effect": "Allow", | |
"Resource": "arn:aws:lambda:us-east-1:12345:function:awseipext-production-iad" | |
}, | |
{ | |
"Action": [ | |
"kms:Encrypt" | |
], | |
"Effect": "Allow", | |
"Resource": "arn:aws:kms:us-east-1:12345:key/1234abcd-12ab-34cd-56ef-1234567890ab", | |
"Condition": { | |
"StringEquals": { | |
"kms:EncryptionContext:to": "awseipext-production-iad", | |
"kms:EncryptionContext:from": "myrole-production-iad", | |
"kms:EncryptionContext:user_type": "service" | |
}, | |
"ForAnyValue:StringEquals": { | |
"kms:EncryptionContext:resource": [ | |
"52.0.0.1" | |
], | |
"kms:EncryptionContext:action": [ | |
"associate", | |
"disassociate" | |
] | |
}, | |
"ForAllValues:StringEquals": { | |
"kms:EncryptionContextKeys": [ | |
"to", | |
"from", | |
"user_type", | |
"action", | |
"resource" | |
] | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment