Skip to content

geetanjalij/aws-aurora-postgresql-demo-gj

 
 

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

About

AWS APG and Vercel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 93.3%
  • CSS 6.2%
  • JavaScript 0.5%