create Secret with namy generated password/keys with CDK

0

Hi team,

I want to create a secret via CDK that contains 2 passwords (API keys)

secretName = ApiKeys

keys/values =

  • key: password1, value: auto-generated password (current)

  • key: password2, value: auto-generated password (previous)

the CDK syntax I found allows only to create a secret with one secret inside it, is there a way to create a secret in a secret manager with many generated secrets inside it? any snippet code would be helpful.

Thank you.

1 Resposta
0

Here is a example of secrets creation using SAM. You can potentially update line 113 for SecretString in this file to create multiple KVs.

Hope that helps.

AWS
respondido há 2 anos
  • so I need to npm install that project? I don't understand the solution

  • My apologies as it's not a CDK based project.

    It's a SAM based project and the README (https://github.com/aws-samples/secret-creator-secrets-manager/blob/main/README.md) walks you through how to set it up, build and deploy

  • I need to modify the source code to be able to have 2 KVs ? it's not doable directly via CDK ? I can do it via AWS console add new KV

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