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
demandé il y a 2 ans844 vues
1 réponse
0
Réponse acceptée

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
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions