Skip to main content

ADR-027: xOps 3-Phase Cost Model

Status: Accepted Date: 2026-03-16 Deciders: @cloud-architect, HITL/Manager Sprint Goal: <=180/mo (Scenario 2 ceiling)

Context

The xOps sprint goal is RAG chatbot + Terraform at <=180/mo. HITL needs a per-phase cost model to:

  1. Confirm Scenario 1 (ECS Fargate, no Ollama) lands within the $100 intermediate target
  2. Confirm Scenario 2 (Scenario 1 + Ollama 8B) lands within the $180/mo sprint ceiling
  3. Identify deferred cost decisions that require HITL approval at deploy time
  4. Establish FOCUS 1.2+ FinOps tagging for cost attribution across 50+ accounts

Decision

Three-phase cost model adopted:

Phase 0: LOCAL ($0/mo)

Docker Compose stack. Full RAG pipeline offline. Validates all application logic before any AWS spend.

Phase 1: Scenario 1 - ECS Fargate ($78-94/mo)

ComponentModuleSpecMonthly Cost
ECS Fargatemodules/ecsARM64 Graviton, 1 vCPU, 2 GB, 1 task$30
ALBmodules/web1 LB, HTTPS listener, health checks$25
CloudFrontmodules/webPriceClass_200, WebSocket bypass$7-15
WAFv2 (dual)modules/webREGIONAL + CLOUDFRONT, 2 managed rule groups$6-12
EFSmodules/efsBursting throughput, ~5 GB$3
KMS CMKmodules/kms1 key, auto-rotation$1
ECRinline~2 GB image$2
CloudWatchinline/ecs/xops-dev, 90-day retention$3-5
Secrets Managerinline1 secret$1
ACMfree2 certificates$0
Route53modules/web1 hosted zone + alias record$0.50
TOTAL Scenario 1$78-94/mo

Scenario 1 uses Claude via API (SaaS). No local LLM on Fargate. 21x ROI vs $2k/mo SaaS equivalent.

Phase 2: Scenario 2 - Scenario 1 + Ollama 8B ($150-180/mo)

ComponentDelta from Scenario 1SpecMonthly Cost
Scenario 1 baseline-As above$78-94
ECS Fargate (Ollama)+1 task2 vCPU / 8 GB, ARM64 Graviton+$72-86
TOTAL Scenario 2$150-180/mo

VPC Networking Decision (HITL-Pending)

Scenario 1 estimate does NOT include VPC networking. HITL decision required:

OptionCostTrade-off
VPC Endpoints (S3, ECR, CW, SM)+$28/moRecommended: no NAT, private subnet
NAT Gateway (1 AZ)+$45/moHA risk: single AZ failure
NAT Gateway (2 AZ HA)+$90/moExceeds Scenario 1 $100 target

Consequences

  • Scenario 1 within $100 target with 6-22% headroom (VPC endpoints path)
  • ARM64 Graviton provides ~20% compute cost reduction vs x86
  • FOCUS 1.2+ tagging enables Cost Explorer org-wide attribution from day 1
  • Ollama task independently scalable (cost-off when not in use)

References

  • accounts/xops/README.md D4 Cost Breakdown (authoritative source)
  • accounts/xops/environments/dev/dev.tfvars FOCUS tag values
  • AWS Pricing Calculator (ap-southeast-2, 2026-03-16 rates)