Amazon Aurora DSQL Demo
This project demonstrates how to easily bootstrap & use a Amazon Aurora DSQL database using SST (Serverless Stack) v3.
Getting Started
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 iin the project root directory. -
Run
pnpm run db:bootstrapto set up our database. -
Run
pnpm run db:schema:migrateto create the migration. -
Run
pnpm run db:schema:pushto push your migration to the database. -
Run
pnpm run db:schema:studiorun 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.
About the Project
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.
Project Structure
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
Learn More
To learn more about SST and how to use it for serverless development, check out the SST documentation.