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)

  1. Go to AWS Amplify Console
  2. Click "New app" → "Host web app"
  3. Connect your GitHub repository
  4. Important: Ensure build settings use amplify.yml (already configured)
  5. Copy environment variables from .env.amplify.reference to Amplify Console
  6. Deploy!

Option B: Amplify CLI

npm install -g @aws-amplify/cli amplify init amplify add hosting amplify publish

3. Custom Domain (Optional)

  1. In Amplify Console → Domain Management
  2. Add your domain
  3. Update DNS as instructed
  4. Update DOMAIN in app-config.ts and 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:

  1. Switch to Live mode in Stripe Dashboard
  2. Update app-config.ts with live Price IDs in the prod section
  3. Update .env.prod with live Stripe keys
  4. Redeploy: npm run deploy:prod

Your SaaS is now taking real payments!