Deployment
Deploy to AWS Amplify
Guide to deploy your marketplace app using AWS Amplify with Supabase and environment setup.
Overview
AWS Amplify allows you to deploy full-stack apps with CI/CD from GitHub, including support for SSR with Next.js.
AWS Amplify does not support custom Docker builds, so we’ll use the Next.js SSR deployment option.
Prerequisites
- AWS account
- GitHub repository
- Supabase project ready with credentials
1. Push Code to GitHub
Ensure your latest code is committed and pushed:
git add .
git commit -m "Initial commit"
git push origin main
2. Set Up AWS Amplify
- Go to AWS Amplify Console
- Click “New App” > “Host Web App”
- Connect to GitHub and select your repository
- Choose Next.js as the framework
3. Configure Environment Variables
Amplify requires all your secrets to be added in the Environment section:
DATABASE_URL=...
DIRECT_URL=...
NEXT_PUBLIC_SUPABASE_URL=...
NEXT_PUBLIC_SUPABASE_ANON_KEY=...
STRIPE_SECRET_KEY=...
STRIPE_WEBHOOK_SECRET=...
4. Add Build Settings
Create amplify.yml
in the root (or edit in the UI):
version: 1
frontend:
phases:
preBuild:
commands:
- yarn install
build:
commands:
- yarn build
artifacts:
baseDirectory: .next
files:
- "**/*"
cache:
paths:
- node_modules/**/*
5. Deploy
Once configured, click “Save and Deploy”.
Amplify will run your build script and expose a live domain.
6. Notes
- AWS Amplify provides its own domain (
*.amplifyapp.com
) - Stripe webhook URL should be updated to match your Amplify domain
- Use Amplify Preview Branches for staging environments