How to get AWS-managed key for encrpyting RDS database instance

0

How is CDK supposed to grab an AWS-managed key for an RDS database instance's StorageEncryptionKey property? I tried

var encryptionKey = Key.FromLookup(this, "aws/rds", new KeyLookupOptions { AliasName = "aws/rds" });
var encryptionKey = Key.FromKeyArn(this, "aws/rds", _wellKnownKmsKeyArn);

but both return null.

icelava
已提问 2 年前844 查看次数
1 回答
0
已接受的回答

Ok my mistake; the _wellKnownKmsKeyArn variable is actually accessed via a multi-layered JSON object and the class definition wasn't setup properly.

Using Key.FromKeyArn() is the method to use after properly getting the aws/rds key ARN.

icelava
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则