-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
(rds): Encrypt DatabaseCluster (aurora) or DatabaseInstance (rds) storage with AWS-managed key by default (behind feature flag) #32398
Comments
If maintainers are OK with this change, I can create the PR. |
Hi @blimmer , thanks for raising this issue and volunteering for contribution. I can see that in the RDS, the default value is set to true for the stroageEncryption given that key is provided, which is contrary to DocDB clusters property. All other reasons stated also make sense. Although your approach and resolution seems right on, being a breaking change, I would like to reach out to Team for their review on the suggested approach and share their insights on the same. |
Correct - if you pass a custom KMS key, it makes sense to set But, yep, I think we want to ensure best practices of encrypting with the AWS-managed key is the default moving forward.
Thanks - is there someone we should tag? Or are you doing that on your end? |
@blimmer , I have added this to Abstraction team's board where SDE onCall will look into the matter and would share his insights.Hope that helps! |
Hi @blimmer, Thanks raising this issue and the contribution. I agree and it makes sense to have the database storage encrypted at rest with AWS managed key even if |
Describe the feature
If the user doesn't customize the
DatabaseCluster
orDatabaseInstance
storageEncrypted
property and does not pass a customstorageEncryptionKey
, we should default the value totrue
. This will cause the AWS-managedaws/rds
KMS key to be used.Notes:
storageEncrypted
orstorageEncryptionKey
(as they would be affected by this change in v3).Use Case
Today, if you don't remember to pass
storageEncrypted: true
to yourDatabaseInstance
orDatabaseCluster
, your database's storage will be unencrypted.In almost all cases, your database storage should be encrypted. Here are reasons I think we should use AWS-managed keys by default:
storageEncrypted: false
.Proposed Solution
This applies to
DatabaseCluster
andDatabaseInstance
.If:
storageEncrypted
is not specified in the props; and,storageEncryptionKey
is not specified in the propsThen:
true
, defaultstorageEncrypted
totrue
false
, leavestorageEncrypted
undefined
(existing logic).storageEncrypted
tofalse
to retain compatibility with the new behavior.Other Information
No response
Acknowledgements
CDK version used
2.171.1
Environment details (OS name and version, etc.)
MacOS
The text was updated successfully, but these errors were encountered: