- Frontend: Svelte 5 app deployed on AWS Amplify
- Backend: Django API deployed on AWS App Runner
- Database: PostgreSQL on AWS RDS
# Using AWS Console (recommended for first time):
# 1. Go to RDS → Create database
# 2. Choose PostgreSQL, db.t3.micro (free tier)
# 3. Set master username: tallyuser
# 4. Generate password and save it
# 5. Enable public accessibility for initial setup
# 6. Create database# 1. Push code to GitHub
git add .
git commit -m "Add AWS deployment configuration"
git push origin main
# 2. Create App Runner service:
# - Go to AWS App Runner → Create service
# - Source: GitHub repository
# - Branch: main
# - Build settings: Use apprunner.yaml
# - Service name: tally-backendRequired Environment Variables for App Runner:
DEBUG=False
SECRET_KEY=your-secure-secret-key-here
DATABASE_URL=postgresql://tallyuser:password@your-rds-endpoint:5432/postgres
ALLOWED_HOSTS=your-apprunner-url.amazonaws.com,your-custom-domain.com
FRONTEND_URL=https://main.d1234567890.amplifyapp.com
SIWE_DOMAIN=main.d1234567890.amplifyapp.com
VALIDATOR_CONTRACT_ADDRESS=0x7CceE43964F70CEAEfDED4b8b07410D30d64eC37
VALIDATOR_RPC_URL=https://genlayer-testnet.rpc.caldera.xyz/http
# 1. Go to AWS Amplify → New app → Host web app
# 2. Connect GitHub repository
# 3. App settings:
# - App name: tally-frontend
# - Environment: production
# - Branch: main
# 4. Build settings: Use amplify.yml (auto-detected)Required Environment Variables for Amplify:
VITE_API_URL=https://your-apprunner-url.amazonaws.com
VITE_APP_NAME=Tally
VITE_VALIDATOR_RPC_URL=https://genlayer-testnet.rpc.caldera.xyz/http
VITE_VALIDATOR_CONTRACT_ADDRESS=0x143d20974FA35f72B8103f54D8A47F2991940d99
After both deployments, update the App Runner environment variables:
FRONTEND_URL=https://main.d1234567890.amplifyapp.com
SIWE_DOMAIN=main.d1234567890.amplifyapp.com
- Inbound: PostgreSQL (5432) from App Runner
- Outbound: All traffic
- Inbound: HTTP/HTTPS from anywhere
- Outbound: All traffic (for RDS and external APIs)
Check App Runner logs to ensure migrations ran successfully.
# From App Runner console, use the built-in terminal:
python manage.py createsuperuser- Backend health:
https://your-apprunner-url.amazonaws.com/admin/ - API docs:
https://your-apprunner-url.amazonaws.com/swagger/
- Visit your Amplify URL
- Verify API connection in browser console
- Go to App Runner → Custom domains
- Add your API domain (e.g., api.yourdomain.com)
- Update DNS records as instructed
- Go to Amplify → Domain management
- Add your domain (e.g., yourdomain.com)
- Update DNS records as instructed
Replace these URLs in your configuration:
your-apprunner-url.amazonaws.com→ Your actual App Runner URLmain.d1234567890.amplifyapp.com→ Your actual Amplify URLyour-rds-endpoint→ Your actual RDS endpoint
- Database connection errors: Check RDS security groups and DATABASE_URL
- CORS errors: Verify FRONTEND_URL and CORS settings
- Build failures: Check environment variables and build logs
- Static files not loading: Verify whitenoise middleware configuration
# Check App Runner service status
aws apprunner describe-service --service-arn your-service-arn
# Check RDS instance status
aws rds describe-db-instances --db-instance-identifier tally-db
# View Amplify app
aws amplify get-app --app-id your-app-id