generate
migrate
push
pull
export
check
up
studio
npm i drizzle-orm @aws-sdk/client-rds-data npm i -D drizzle-kit
yarn add drizzle-orm @aws-sdk/client-rds-data yarn add -D drizzle-kit
pnpm add drizzle-orm @aws-sdk/client-rds-data pnpm add -D drizzle-kit
bun add drizzle-orm @aws-sdk/client-rds-data bun add -D drizzle-kit
import { drizzle } from 'drizzle-orm/aws-data-api-pg'; // These three properties are required. You can also specify // any property from the RDSDataClient type inside the connection object. const db = drizzle({ connection: { database: process.env['DATABASE']!, secretArn: process.env['SECRET_ARN']!, resourceArn: process.env['RESOURCE_ARN']!, }}); await db.select().from(...);
If you need to provide your existing driver:
import { drizzle } from 'drizzle-orm/aws-data-api/pg'; import { RDSDataClient } from '@aws-sdk/client-rds-data'; const rdsClient = new RDSDataClient({ region: 'us-east-1' }); const db = drizzle(rdsClient, { database: process.env['DATABASE']!, secretArn: process.env['SECRET_ARN']!, resourceArn: process.env['RESOURCE_ARN']!, }); await db.select().from(...);
Manage schema
Query data