-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
(aws-dynamodb): Support customer managed keys for global tables #15957
Comments
I've confirmed with @madeline-k that this is something we'd like to do. Would you like to submit a PR which removes the error? |
Thank you for looking into this. I can definitely submit a PR to fix this issue, but I have one quick question. Based on this article and my own testing, it looks like you need to provide an in-region KMS key for each region where a replica is created. Will the change proposed handle that scenario? |
Thanks for bringing this up, I hadn't caught that. Can you elaborate on what you've done to test this? If you're correct, then I suspect more changes will be necessary. I'll research this more tomorrow, and label it as a feature request assuming you're correct |
Absolutely. The testing I did was through the AWS console, where I went to my deployed DynamoDB table (which was initially deployed with the |
It does look like this will take more effort than initially required. @madeline-k is the expert here and the owner of the construct, I think this will best be left to her 😄 |
From the launch announcement:
And from @weimizhu's testing with the console, it is obvious we will need a mechanism for specifying multiple customer-managed keys. So I agree with y'all that just removing the validation won't cut it here. Digging a little deeper, the But, now that there is a
in the docs here and see here for specifying the keys in the replica specification. |
TLDR: Use |
To add this feature to the L2 DynamoDB construct library, I see three options:
I'd recommend option 3 here. @weimizhu If you are able to take a stab at this and open a PR, please do! Also, as an FYI I am the temporary owner for the dynamodb module while @skinny85 is on vacation. For a new feature implementation like this, he will need to review the PR as well. |
Thank you for looking into this matter in detail. I will definitely take a shot at this, and the details you have mentioned will be very helpful! Option 3 also sounds like the best method from my POV as well, so I will proceed with that approach. |
Link: #16118 |
EDIT: I changed my mind 😜. I think nr 2 is the way to go here. |
+1 |
+1, I'd also like this feature :) |
+1 |
Please leave your +1s on the original issue (click the 👍🏻), and refrain from posting +1 comments. Comments can clog discussion, and aren't part of our direct process for deciding what to work on (while thumbs ups on the original post are!) |
I built an interim solution for this with L1 cdk constructs. |
+1, do we have an ETA on this one? |
Why is (2) the preferred implementation? |
I just like it more than the alternatives. |
Looking for an ETA too, I'd rather avoid having to use L1 constructs like CfnGlobalTable. |
We are going to implement a new L2 for |
Closing in favor of #16118, which will handle the issue. |
|
We are seeing an exception thrown when we build with CDK while using DynamoDB Global tables with a customer managed CMK.
Reproduction Steps
In
app.ts
of CDK package:What did you expect to happen?
We expected that the CDK build would succeed and synthesize the stacks to be deployed.
What actually happened?
An exception is thrown during the build that states
Error: TableEncryption.CUSTOMER_MANAGED is not supported by DynamoDB Global Tables (where replicationRegions was set)
Environment
Other
Our team is trying to create a global DynamoDB table that uses a customer managed CMK for server side encryption. We are using the
replicationRegions
andencryption: TableEncryption.CUSTOMER_MANAGED
options that are provided in theTable
construct. When we run a build with the CDK, there is an error that statesError: TableEncryption.CUSTOMER_MANAGED is not supported by DynamoDB Global Tables (where replicationRegions was set)
, which seems to be caused by this code here: https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-dynamodb/lib/table.ts#L1620Previously reached out to Open Source Developer Support and spoke with @peterwoodworth .
He clarified that DynamoDB supports customer managed CMKs and can also be deployed through Cloudformation, and also to open a bug and see if this is something we want to do.
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: