Drizzle Studio with AWS Aurora Serverless

Hello All! I am having some troubles to run the Drizzle Studio Console.

I am using an AWS RDS Aurora Serverless with Postgres (SST orchestrated)
When runing the studio command I am receiving some errors about the databaseCredentials.

// drizzle.config.ts
import type { Config } from 'drizzle-kit';

export default {
  driver: 'pg',
  schema: 'src/schemas/index.ts',
  out: 'src/migrations',
} satisfies Config;


I am accesing the database this way and don't have any database credentials to add in the drizzle configuration:
// database.ts
import { drizzle } from 'drizzle-orm/aws-data-api/pg';

import { RDS } from 'sst/node/rds';
import { RDSDataClient } from '@aws-sdk/client-rds-data';

import * as schema from '@/schemas';

export const database = drizzle(new RDSDataClient({}), {
  database: RDS.database.defaultDatabaseName,
  secretArn: RDS.database.secretArn,
  resourceArn: RDS.database.clusterArn,
  schema,
});


TypeError: Cannot read properties of undefined (reading 'connectionString')

Any help or guidance is really apreciated πŸ˜…
thanks!
Was this page helpful?