Can't Push Schema to AWS Aurora - Is My Config Correct?

Hi guys! I'm moving from Vercel Postgres to AWS Aurora and I'm just trying to npx drizzle-kit push my schema but I keep getting a Region is missing error. Looking into this deeper, it looks like if aws-data-api is set as the driver, it will attempt to create an instance of RDSDataClient that requires a region to be specified. This is currently my drizzle.config.ts:
import { defineConfig } from 'drizzle-kit';

// ? Old Vercel/Postgres config
// export default defineConfig({
// dialect: "postgresql",
// schema: "./drizzle/schema.ts",
// out: "./drizzle/out",
// dbCredentials: {
// url: process.env.POSTGRES_URL!,
// }
// });

export default defineConfig({
driver: "aws-data-api",
dialect: "postgresql",
dbCredentials: {
database: "MY_DATABASE_NAME",
secretArn: "arn:aws:secretsmanager:XXX",
resourceArn: "arn:aws:rds:XXX",
},
schema: "./drizzle/schema.ts",
out: "./drizzle/out",
});
import { defineConfig } from 'drizzle-kit';

// ? Old Vercel/Postgres config
// export default defineConfig({
// dialect: "postgresql",
// schema: "./drizzle/schema.ts",
// out: "./drizzle/out",
// dbCredentials: {
// url: process.env.POSTGRES_URL!,
// }
// });

export default defineConfig({
driver: "aws-data-api",
dialect: "postgresql",
dbCredentials: {
database: "MY_DATABASE_NAME",
secretArn: "arn:aws:secretsmanager:XXX",
resourceArn: "arn:aws:rds:XXX",
},
schema: "./drizzle/schema.ts",
out: "./drizzle/out",
});
I don't see any region or options params in the defineConfig interface. Is this the wrong way to configure Drizzle to work with AWS Aurora? I've been attempting to do this by checking the Drizzle ORM docs and SST's implementation: - https://orm.drizzle.team/docs/get-started-postgresql#aws-data-api (Although a config is not specified here, I need one for the Kit). - https://ion.sst.dev/docs/start/aws/drizzle/ Any help or hints would be great appreciated!
No description
0 Replies
No replies yetBe the first to reply to this messageJoin