This project demonstrates how to easily bootstrap & use a Amazon Aurora DSQL database using SST (Serverless Stack) v3.
To run this application, follow these steps:
-
Ensure you have Node.js installed on your system.
-
Clone this repository to your local machine.
-
Install the dependencies by running
pnpm i
in the project root directory. -
Run
pnpm run db:bootstrap
to set up our database. -
Run
pnpm run db:schema:migrate
to create the migration. -
Run
pnpm run db:schema:push
to push your migration to the database. -
Run
pnpm run db:schema:studio
run the Drizzle studio to view the database in your browser. -
Start the development server by running:
npx sst dev
This command will deploy the application to your AWS account and start the local development environment.
This application is built using SST v3, which provides a powerful framework for building serverless applications.
It showcases a simple notes app that uses Amazon Aurora DSQL as the database. The app allows you to create, read, update, and delete notes.
sst.config.ts
: SST configuration fileapp/page.tsx
: Main Next.js page for the frontendlambda/api.ts
: Function that handles the API requestslambda/db/schema.ts
: Database schema with Drizzlebootstrap-db.sh
: Script to bootstrap the database (there's no IaC support yet)drizzle-wrapper.sh
: Script to get the database host and token before running Drizzle
To learn more about SST and how to use it for serverless development, check out the SST documentation.