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
asked 2 years ago838 views
1 Answer
0
Accepted Answer

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
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions