I am deploying apps to AWS via serverless
. And need to read values from secretmanager during deployment. I have read this doc: https://www.serverless.com/framework/docs/providers/aws/guide/variables/#reference-variables-using-the-ssm-parameter-store
it shows how to read it:
custom: supersecret: ${ssm:/aws/reference/secretsmanager/secret_ID_in_Secrets_Manager~true}
however, it can be used to read a string value from secret manager. My secret is an object which includes key/value
pairs. How can I read the key
inside a secret?
I have tried something like this:
custom: supersecret: ${ssm:/aws/reference/secretsmanager/secret_ID_in_Secrets_Manager:MY_KEY~true}
custom: supersecret: ${ssm:/aws/reference/secretsmanager/secret_ID_in_Secrets_Manager/MY_KEY~true}
but none of them working.