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
feita há 2 anos844 visualizações
1 Resposta
0
Resposta aceita

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
respondido há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas