如何在Credentials.fromGeneratedSecret()不使用 写出秘密的情况下从调用中创建 postgres URI 连接字符串toString()?
我想我在某处读过制作一个 lambda 来做到这一点,但是这似乎有点矫枉过正
const dbCreds = Credentials.fromGeneratedSecret("postgres")
const username = dbCreds.username
const password = dbCreds.password
const uri = `postgresql://${username}:${password}@somerdurl/mydb?schema=public`
Run Code Online (Sandbox Code Playgroud)
上面的事情我肯定做不到。但是我的 hasura 和 api ECS 容器需要像上面这样的连接字符串,所以我认为这可能是一个解决的问题?
environment-variables amazon-web-services aws-cloudformation aws-secrets-manager aws-cdk
aws-cdk ×1