---
title: "Next.js Vercel app with Amazon DynamoDB"
description: "This demo uses Amazon DynamoDB with Next.js to fetch movies from the database. It is able to securely connect to DynamoDB using OIDC"
url: "https://vercel.com/templates/next.js/next-js-vercel-app-with-amazon-dynamodb"
links:
  repository: "https://github.com/vercel/aws-dynamodb-demo"
  demo: "https://aws-dynamodb-demo.labs.vercel.dev/"
  deploy: "https://vercel.com/new/clone?demo-title=Next.js+Vercel+app+with+Amazon+DynamoDB&demo-description=This+demo+uses+Amazon+DynamoDB+with+Next.js+to+fetch+movies+from+the+database.+It+is+able+to+securely+connect+to+DynamoDB+using+OIDC&demo-url=https%3A%2F%2Faws-dynamodb-demo.labs.vercel.dev%2F&project-name=aws-dynamodb-demo&repository-name=aws-dynamodb-demo&repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Faws-dynamodb-demo&products=%5B%7B%22type%22%3A%22integration%22%2C%22integrationSlug%22%3A%22aws%22%2C%22productSlug%22%3A%22aws-dynamodb%22%2C%22protocol%22%3A%22storage%22%7D%5D&teamSlug=aws-sa-partner-sandbox&demo-image=%2F%2Fimages.ctfassets.net%2Fe5382hct74si%2F7tz7i28W7qmlCwdvcDr8j6%2Fb8a37cc7bc38b1029df2ad79420ac5ac%2FVercel-AWS-GitHub-DDB.png"
---

# Next.js Vercel app with Amazon DynamoDB

This demo uses Amazon DynamoDB with Next.js to fetch movies from the database. It is able to securely connect to DynamoDB using OIDC

# Amazon DynamoDB Movies Demo

This demo uses Amazon DynamoDB with Next.js to fetch movies from the database. It is able to securely connect to DynamoDB without using hardcoded access tokens through Vercel's [OIDC Federation](https://vercel.com/docs/security/secure-backend-access/oidc).

[![This is an alt text.](https://github.com/vercel/aws-dynamodb-demo/blob/main/public/Vercel-AWS-GitHub-DDB.png?raw=true)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Faws-dynamodb-demo&project-name=aws-dynamodb-demo&repository-name=aws-dynamodb-demo&products=%5B%7B%22type%22%3A%22integration%22%2C%22integrationSlug%22%3A%22aws%22%2C%22productSlug%22%3A%22aws-dynamodb%22%2C%22protocol%22%3A%22storage%22%7D%5D)

**Demo:**
[View Demo](https://aws-dynamodb-demo.labs.vercel.dev)

**Getting Started:**
Click the "Deploy" button to clone this repo, create a new Vercel project, setup the AWS integration, and provision a new DynamoDB table:

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Faws-dynamodb-demo&project-name=aws-dynamodb-demo&repository-name=aws-dynamodb-demo&products=%5B%7B%22type%22%3A%22integration%22%2C%22integrationSlug%22%3A%22aws%22%2C%22productSlug%22%3A%22aws-dynamodb%22%2C%22protocol%22%3A%22storage%22%7D%5D)

Once the process is complete, you can clone the newly created GitHub repository and start making changes locally.

## Requirements

- Installed Amazon DynamoDB. You can do that via [Vercel Marketplace](https://vercel.com/marketplace/aws)

## Local Setup

1. Pull vercel environment variables locally

```bash
vercel env pull
```

2. Install dependencies:

```bash
pnpm install
```

3. Seed the DynamoDB table with movie data:

```bash
pnpm run db:seed
```

4. Start the development server:

```bash
pnpm run dev
```

5. View local development: http://localhost:3000

## Related Integrations

### [AWS](https://vercel.com/marketplace/aws)

Serverless, reliable, secure AWS Services.

---

## Additional documentation

The [Vercel Knowledge Base](https://vercel.com/kb) contains guides and answers to common questions about Vercel, including deployment, framework configuration, domains, caching, and troubleshooting.
