I am using python with cdk. I have one stack that creates a dynamo db table with a random name in one account and multiple stacks running in other accounts that need to get that randomly generated table name. Due to the limitation of SSM parameters not allowing cross account access, I am using secrets manager instead
Here is my code
secretsmanager.Secret(self, "cdk-generated-secret",
secret_name="cdk-generated-secret-name",
secret_string_value="{'db-name': str_table_name }"
)
This is the error I am getting
type of argument secret_string_value must be one of (aws_cdk.SecretValue, NoneType); got str instead
This is a plain text string and doesn't need to be encrypted. How to write such a key value string to the secret and then later read it? Is there a way to read the secret values without using the randomly generated suffix?