Cost Model
This implementation targets near-zero idle cost. These are estimates for us-east-1 across three usage levels: idle, 1k queries/month, and 10k queries/month. Infracost prices the Terraform plan at each pull request, but covers far less of this table than that suggests - fixed-price resources only. Bedrock appears in no plan at all, and Aurora Serverless v2, the largest infrastructure line item below, prices to zero because ACU consumption is usage-based. Treat the Infracost figure as a check on what the stack provisions rather than as an estimate of the bill.
The system runs in two AWS environments, QA and Prod (see RAG001), so the running total is roughly 2× a single environment. The table below is per environment; QA is paused more aggressively than Prod to hold the combined cost down.
Estimated monthly cost (per environment)
Section titled “Estimated monthly cost (per environment)”| Service | Idle | 1k queries | 10k queries | Notes |
|---|---|---|---|---|
| Aurora Serverless v2 + pgvector | $0–3 | $3–8 | $10–20 | 0-ACU auto-pause; bills only while active. 10 GB storage ≈ $1 |
| Lambda + API Gateway HTTP API | $0 | $0 | $0 | Within free tier at demo volume |
| S3 + CloudFront | $0.50 | $1 | $1–2 | CloudFront free tier covers demo traffic |
| Bedrock (Titan + Haiku-class) | $0 | $3.50 | $35 | Titan embed: ~$0.01/1k queries; Haiku-class generation: ~$3.50/1k queries at ~2k input + ~300 output tokens each ($1/M input · $5/M output). See RAG007 for model alternatives at scale. |
| Secrets Manager | $0.40 | $0.40 | $0.40 | One secret |
| Observability (CloudWatch) | $0 | $0–1.50 | $1.50 | Approximate. Free-tier logs; the alarms in the spend and abuse runbook fit within the free tier’s 10 alarm metrics across both environments; 10 custom EMF metrics at $0.30 per metric-month, billed only for hours they receive data. The free tier’s 10 custom metrics cover both environments together, so of the 20, 10 are billed: up to ~$1.50 per environment. See RAG020. |
| Per environment | $1–4 | $8–14 | $48–59 | Bedrock dominates at scale — ~$35 of the 10k column |
| QA + Prod combined | $2–8 | $16–28 | $96–118 | 2× the displayed row above; QA paused harder than Prod, so treat it as a ceiling |
What we deliberately avoided
Section titled “What we deliberately avoided”- NAT Gateway (~$32/mo + data): avoided by reaching Aurora via the RDS Data API instead of putting the Lambda in a VPC.
- VPC endpoints (PrivateLink): if Lambda were inside the VPC, Bedrock and Secrets Manager would need PrivateLink endpoints to remain reachable — ~$7.30/endpoint/month per AZ, or ~$14.60/month per service across two AZs. At two services that is $29/month, comparable to a NAT Gateway with none of the simplicity benefit.
- OpenSearch Serverless (~$700/mo floor): pgvector covers the demo’s scale at a fraction of the cost.
- Always-on RDS instance: Aurora Serverless v2 auto-pause bills only while active.
Guardrails
Section titled “Guardrails”The RAG021 blocking Infracost ceiling check on Terraform PRs stops one narrow class of cost change before merge: adding a fixed-price resource, a NAT Gateway or a PrivateLink endpoint being the ones this design avoids. Its cost diff comment is secondary. It does not estimate usage-driven spend (Bedrock and Aurora for this project); those are bounded by RAG009’s per-key request quota and the POST /query route throttle. Budgets and alarms in the spend and abuse runbook detect breaches (risks.md R2).
© 2026 Benjamin Arunski