Skip to content

Instantly share code, notes, and snippets.

@ryan-lane
Last active August 1, 2016 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryan-lane/3ac6446bf7c0e5f62748d9c8a0d5be93 to your computer and use it in GitHub Desktop.
Save ryan-lane/3ac6446bf7c0e5f62748d9c8a0d5be93 to your computer and use it in GitHub Desktop.
Extended KMS authentication encrypt policy
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"kms:Decrypt",
"kms:DescribeKey"
],
"Effect": "Allow",
"Resource": "arn:aws:kms:us-east-1:12345:key/1234abcd-12ab-34cd-56ef-1234567890ab",
"Condition": {
"StringEquals": {
"kms:EncryptionContext:to": "awseipext-production-iad"
}
}
},
{
"Action": [
"ec2:DescribeInstances",
"ec2:AllocateAddress",
"ec2:AssociateAddress",
"ec2:DescribeAddresses",
"ec2:DisassociateAddress"
],
"Effect": "Allow",
"Resource": "arn:aws:kms:us-east-1:12345:key/1234abcd-12ab-34cd-56ef-1234567890ab",
"Condition": {
"StringEquals": {
"kms:EncryptionContext:to": "awseipext-production-iad"
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment