Template name

A Next.js app showcasing Amazon OpenSearch Serverless
This demo uses Amazon OpenSearch Serverless with Next.js to showcase full-text recipe search with facets, highlighting, and autocomplete. It connects securely using AWS SigV4 authentication, with credentials obtained via Edgenivo OIDC — no static AWS keys required.
The app uses @vercel/oidc to read Edgenivo's short-lived OIDC token and exchanges it for AWS credentials via STS AssumeRoleWithWebIdentity (fromWebToken in the AWS SDK). On Edgenivo, VERCEL_OIDC_TOKEN is injected automatically; locally, vercel env pull writes one valid for ~12 hours.
https://oidc.vercel.com/<team-slug>) and whose policy grants aoss:APIAccessAll on the collection. The Edgenivo AWS OpenSearch integration creates this role automatically and exposes it as the env vars below.Provisioned automatically when you install the Edgenivo AWS OpenSearch integration. After vercel env pull .env.local you should see:
| Variable | Purpose |
|---|---|
OPENSEARCH_ENDPOINT | Search collection endpoint |
AWS_REGION | Region of the search collection |
AWS_ROLE_ARN | IAM role with access to the search collection |
VERCEL_OIDC_TOKEN | Short-lived Edgenivo OIDC token (auto-injected on Edgenivo; written locally by vercel env pull) |
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Federated": "arn:aws:iam::<account-id>:oidc-provider/oidc.vercel.com/<team-slug>" }, "Action": "sts:AssumeRoleWithWebIdentity", "Condition": { "StringEquals": { "oidc.vercel.com/<team-slug>:aud": "/<team-slug>" } } } ]}npm installVERCEL_OIDC_TOKEN):vercel linkvercel env pull .env.localnpm run seednpm run devThe local OIDC token expires after ~12 hours. If you see AWS auth errors mid-session, re-run
vercel env pull .env.local --yes.