AWS
One cloud for everything hosted — the backend, database, sites, storage, email, and AI — defined as code in the repo.
Why one cloud
Everything hosted runs on AWS: one vendor, one bill, one console. That rules out good products elsewhere (Neon, Railway, Render, Resend) on purpose, not on their merits.
What's in use
| Service | Used for | In development |
|---|---|---|
| Amazon S3 | Uploads, blog bodies and media, avatars, terms, archived logs | RustFS in Docker |
| Amazon SES | Transactional email | Mailpit in Docker |
| Amazon Bedrock | The chatbot, on Amazon Nova Micro by default | Ollama on your machine |
Each one swaps by environment variable. Application code only talks to the standard API, never to the local stand-in.
Email goes through Nodemailer. It sends through SES, or through Mailpit's SMTP server when EMAIL_SMTP_HOST is set.
How production runs
Production is defined in infra/, as three AWS CDK apps in TypeScript. Every merge to main deploys it — see CI/CD.
- Backend: the
backend/Dockerfileimage on one EC2 server, behind CloudFront atapi.bonesapp.io. - Database: Amazon RDS for Postgres, with daily backups copied to a locked vault in a separate account.
- Sites: the web app, marketing site, blog, and docs, as static files in a private S3 bucket, each on its own CloudFront distribution. The web app routes
/apiand/trpcto the backend, so sign-in stays same-origin. - DNS and certificates: Route 53 and one ACM certificate for
bonesapp.ioand its subdomains. - Accounts: DNS and the sites, backups, and production each live in their own AWS account, under a $150 monthly budget that stops production if it's reached.
Size is one setting. Tier 1, about $33 a month, is what runs now. Tier 2 swaps the server for Fargate behind a load balancer, for about $100. infra/README.md has the tiers, their limits, and the first-time setup.
Used in
- Cloud — every service production runs, and what it costs.
- Storage and email
- Environment variables