How to retrieve database credentials from drizzle.config.ts
I'm attempting to retrieve Neon database credentials dynamically from
const ssmClient = new SSMClient();
// Define the parameter name
const parameterName = "your-parameter-name";
// Create a command to get the parameter
const command = new GetParameterCommand({ Name: parameterName, WithDecryption: true });
drizzle.config.ts , instead of saving them in a .env, by running drizzle-kit push. The issue, both methods I tried rely on top-level await and throw Top-level await is currently not supported with the "cjs" output format exception.@aws-sdk/client-ssmexample:
```
const { SSMClient, GetParameterCommand } = require("@aws-sdk/client-ssm");
const ssmClient = new SSMClient();
// Define the parameter name
const parameterName = "your-parameter-name";
// Create a command to get the parameter
const command = new GetParameterCommand({ Name: parameterName, WithDecryption: true });
``
OR
2. SST Secrets https://docs.sst.dev/config#top-level-await
Is there a way to accomplish this from within drizzle.config.ts?
I'm using "drizzle-kit": "^0.20.1" and "drizzle-orm": "^0.29.0"`