AWS RDS PostgreSQL Error: self-signed certificate

Hello, does anyone happened to have a tutorial / guide on how to connect Drizzle to AWS RDS from NextJS? I haven't got a solution since Drizzle won't let me connect due to SSL issues... Im not really familiar with SSLs and kinda confused because I thought after creating an AWS RDS Postgres Instance, I can simply connect drizzle with connection string...
4 Replies
Setasena
Setasena•6mo ago
Here's my current config
//drizzle.config.ts
import { type Config } from "drizzle-kit";

import { env } from "~/env";

export default {
schema: "./src/server/db/schema.ts",
driver: "pg",
dbCredentials: {
connectionString: env.DATABASE_URL,
},
tablesFilter: ["zeus_*"],
} satisfies Config;
//drizzle.config.ts
import { type Config } from "drizzle-kit";

import { env } from "~/env";

export default {
schema: "./src/server/db/schema.ts",
driver: "pg",
dbCredentials: {
connectionString: env.DATABASE_URL,
},
tablesFilter: ["zeus_*"],
} satisfies Config;
I've tried to append sslMode=require at the end but yeah, it doesn't solve anything, always led me to a SSL error 😢
Drew
Drew•6mo ago
@Setasena did you figure it out?
Augusto
Augusto•4mo ago
same error here
FractalFist
FractalFist•4mo ago
import type { Config } from 'drizzle-kit'
import { env } from './src/config/config'

export default {
schema: './src/db/schema/*',
out: './db/migrations',
dialect: 'postgresql',
dbCredentials: {
url: `{env.db_url}?sslmode=no-verify`
},
verbose: true
} as Config
import type { Config } from 'drizzle-kit'
import { env } from './src/config/config'

export default {
schema: './src/db/schema/*',
out: './db/migrations',
dialect: 'postgresql',
dbCredentials: {
url: `{env.db_url}?sslmode=no-verify`
},
verbose: true
} as Config
This works fine for me when using RDS
Want results from more Discord servers?
Add your server