Skip to content

vercel/aws-dsql-movies-demo

Repository files navigation

Deploy with Vercel

AWS Aurora DQSL Movies Demo

This demo uses AWS DSQL Postgres with Next.js to fetch movies from the database. It is able to securely connect to DSQL without using hardcoded access tokens through Vercel's OIDC Federation.

Demo:

Caveats

DSQL does not currently support:

Setup

  1. Add required environment variables to your vercel project
AWS_ROLE_ARN=arn:aws:iam::YOUR_ACCOUNT:role
DB_CLUSTER_ENDPOINT=your-dsql-clusterendpoint
DB_USERNAME=postgres
DB_NAME=postgres
AWS_REGION=us-east-1
  1. Pull vercel environment variables locally

bash vercel env pull

  1. Install dependencies:
npm install
  1. Run migrations to create tables:
npm run db:migrate
  1. Seed the database with movie data:
npm run db:seed
  1. Start the development server:
npm run dev