Deploy to Production
Deploy your frontend to AWS Amplify for $1-5/month hosting with global CDN.
1. Deploy Backend First
# Update .env.prod with your live Stripe keys (already created during setup) # Deploy to production (automatically uses .env.prod) npm run deploy:prod
This generates .env.amplify.reference with all the environment variables you need (for reference only - copy these to Amplify Console).
2. Set Up Amplify
Option A: Amplify Console (Recommended)
- Go to AWS Amplify Console
- Click "New app" → "Host web app"
- Connect your GitHub repository
- Important: Ensure build settings use
amplify.yml(already configured) - Copy environment variables from
.env.amplify.referenceto Amplify Console - Deploy!
Option B: Amplify CLI
npm install -g @aws-amplify/cli amplify init amplify add hosting amplify publish
3. Custom Domain (Optional)
- In Amplify Console → Domain Management
- Add your domain
- Update DNS as instructed
- Update
DOMAINinapp-config.tsand redeploy
4. Update Stripe Webhook for Production
Create a new webhook endpoint in Stripe (Live mode) pointing to your production API Gateway URL (not your Amplify domain). See Step 7 in Quick Start for detailed instructions.
Done! Your startup is live with:
- ✅ Global CDN
- ✅ Auto-deploy on git push
- ✅ SSL certificates
- ✅ $1-5/month hosting
Stripe Live Mode
For real payments:
- Switch to Live mode in Stripe Dashboard
- Update
app-config.tswith live Price IDs in theprodsection - Update
.env.prodwith live Stripe keys - Redeploy:
npm run deploy:prod
Your SaaS is now taking real payments!