Skip to content

vercel/aws-aurora-postgresql-demo

Repository files navigation

Deploy with Vercel

AWS Aurora PostgreSQL Movies Demo

This demo uses AWS Aurora PostgreSQL with Next.js to fetch movies from the database. It is able to securely connect to Aurora PostgreSQL without using hardcoded access tokens through Vercel's OIDC Federation and RDS IAM authentication.

Demo: TK

Requirements

  • Aurora PostgreSQL cluster with IAM authentication enabled
  • Database user with rds-db-connect permission
  • AWS IAM role configured for RDS access

Setup

  1. Create .env.local file with required environment variables:
AWS_ROLE_ARN=arn:aws:iam::YOUR_ACCOUNT:role/YOUR_ROLE DB_CLUSTER_ENDPOINT=your-cluster.cluster-xxxxx.region.rds.amazonaws.com DB_USERNAME=postgres DB_NAME=postgres DB_PASSWORD=your-password AWS_REGION=us-east-1 
  1. Install dependencies:
pnpm install
  1. Run migrations to create tables:
pnpm run db:migrate
  1. Seed the database with movie data:
pnpm run db:seed
  1. Start the development server:
pnpm run dev

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •