-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(s3tables): server-side encryption by customer managed KMS key #34229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0967a15
7c13ef3
7ea75cf
b11d702
af8147d
7d4da4d
43b65ff
4ee168a
adc3191
3d79d0a
340d275
46c7e30
882f81b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
{ | ||
"Resources": { | ||
"KmsKey46693ADD": { | ||
"Type": "AWS::KMS::Key", | ||
"Properties": { | ||
"KeyPolicy": { | ||
"Statement": [ | ||
{ | ||
"Action": "kms:*", | ||
"Effect": "Allow", | ||
"Principal": { | ||
"AWS": { | ||
"Fn::Join": [ | ||
"", | ||
[ | ||
"arn:", | ||
{ | ||
"Ref": "AWS::Partition" | ||
}, | ||
":iam::", | ||
{ | ||
"Ref": "AWS::AccountId" | ||
}, | ||
":root" | ||
] | ||
] | ||
} | ||
}, | ||
"Resource": "*" | ||
}, | ||
{ | ||
"Action": [ | ||
"kms:Decrypt", | ||
"kms:GenerateDataKey" | ||
], | ||
"Condition": { | ||
"StringLike": { | ||
"kms:EncryptionContext:aws:s3:arn": { | ||
"Fn::Join": [ | ||
"", | ||
[ | ||
"arn:", | ||
{ | ||
"Ref": "AWS::Partition" | ||
}, | ||
":s3tables:", | ||
{ | ||
"Ref": "AWS::Region" | ||
}, | ||
":", | ||
{ | ||
"Ref": "AWS::AccountId" | ||
}, | ||
":bucket/kms-key-s3tables-bucket/*" | ||
] | ||
] | ||
} | ||
} | ||
}, | ||
"Effect": "Allow", | ||
"Principal": { | ||
"Service": "maintenance.s3tables.amazonaws.com" | ||
}, | ||
"Resource": "*" | ||
} | ||
], | ||
"Version": "2012-10-17" | ||
} | ||
}, | ||
"UpdateReplacePolicy": "Delete", | ||
"DeletionPolicy": "Delete" | ||
}, | ||
"TableBucket0BF18B0D": { | ||
"Type": "AWS::S3Tables::TableBucket", | ||
"Properties": { | ||
"EncryptionConfiguration": { | ||
"KMSKeyArn": { | ||
"Fn::GetAtt": [ | ||
"KmsKey46693ADD", | ||
"Arn" | ||
] | ||
}, | ||
"SSEAlgorithm": "aws:kms" | ||
}, | ||
"TableBucketName": "kms-key-s3tables-bucket", | ||
"UnreferencedFileRemoval": {} | ||
}, | ||
"UpdateReplacePolicy": "Delete", | ||
"DeletionPolicy": "Delete" | ||
} | ||
}, | ||
"Parameters": { | ||
"BootstrapVersion": { | ||
"Type": "AWS::SSM::Parameter::Value<String>", | ||
"Default": "/cdk-bootstrap/hnb659fds/version", | ||
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" | ||
} | ||
}, | ||
"Rules": { | ||
"CheckBootstrapVersion": { | ||
"Assertions": [ | ||
{ | ||
"Assert": { | ||
"Fn::Not": [ | ||
{ | ||
"Fn::Contains": [ | ||
[ | ||
"1", | ||
"2", | ||
"3", | ||
"4", | ||
"5" | ||
], | ||
{ | ||
"Ref": "BootstrapVersion" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." | ||
} | ||
] | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the documentation specifies using the KMS Key ARN as
resource
section, I am using a wildcard (*) for the following reasons:kmsKey.keyArn
as theresource
would create a circular referenceIn a key policy, the value of the Resource element is "*", which means "this KMS key." The asterisk ("*") identifies the KMS key to which the key policy is attached.