# AWS Monthly Cost Estimate v0.3 ## Assumptions - **Development environment:** 1 developer (Nathan), light usage, synthetic data only - **Staging environment:** Mirror of production topology, used for pre-deployment testing - **Production environment:** Estimated for ~50-100 active beneficiaries (early operations) - **All estimates are monthly, in USD, based on US-East-1 (N. Virginia) pricing** - **Pricing is approximate and subject to change. Actual costs will vary based on usage.** --- ## Development Environment | Service | Configuration | Est. Monthly Cost | |---|---|---| | RDS PostgreSQL (db.t3.micro) | 2 vCPU, 1 GiB RAM, 20 GB gp3 storage, single-AZ, no encryption | ~$12 | | S3 Standard | 5 GB storage, ~10K requests/month | ~$0.10 | | Fargate (dev tasks) | 0.25 vCPU, 0.5 GiB RAM, ~50 hrs/month running | ~$10 | | SQS | ~10K requests/month | ~$0.01 | | Secrets Manager | 1-2 secrets | ~$0.50-1.00 | | KMS | Default key, ~10K requests/month | ~$0.03 | | ECR | 1 repository, <1 GB storage | ~$0.01 | | CloudWatch Logs | ~1 GB ingested | ~$0.50 | | CloudTrail | Management events only (free tier) | $0 | | CodePipeline + CodeBuild | ~20 builds/month | ~$1-2 | | VPC + ALB | ALB hourly + data processing (~50 hrs) | ~$16 | | **Development Subtotal** | | **~$40-45** | --- ## Staging Environment | Service | Configuration | Est. Monthly Cost | |---|---|---| | RDS PostgreSQL (db.t3.small) | 2 vCPU, 2 GiB RAM, 50 GB gp3 storage, single-AZ, KMS encrypted | ~$35 | | S3 Standard | 25 GB storage, ~50K requests/month | ~$0.60 | | Fargate tasks | 0.5 vCPU, 1 GiB RAM, ~400 hrs/month (2 tasks, always-on) | ~$85 | | SQS | ~50K requests/month | ~$0.03 | | Secrets Manager | 4-5 secrets | ~$1.00-1.50 | | KMS | 1 key, ~50K requests/month | ~$0.06 | | ECR | 1 repository, ~5 GB storage | ~$0.05 | | CloudWatch Logs | ~5 GB ingested | ~$2.50 | | CloudTrail | Management + data events | ~$0.50 | | ALB | Always-on, ~400 hrs | ~$16 | | VPC endpoints | 4 endpoints (S3, Secrets Manager, KMS, SQS) | ~$1-2 | | **Staging Subtotal** | | **~$143-145** | --- ## Production Environment (Early Phase, ~50-100 Beneficiaries) | Service | Configuration | Est. Monthly Cost | |---|---|---| | RDS PostgreSQL (db.t3.medium, Multi-AZ) | 2 vCPU, 4 GiB RAM, 100 GB gp3, Multi-AZ, KMS encrypted | ~$110 | | S3 Standard + Intelligent Tiering | 100 GB storage, ~200K requests/month | ~$3 | | Fargate tasks | 1 vCPU, 2 GiB RAM, auto-scale 2-4 tasks, ~2,400 hrs total | ~$340 | | SQS | ~200K requests/month | ~$0.10 | | Secrets Manager | 5-8 secrets, rotation enabled | ~$2-3 | | KMS | 2-3 keys, ~200K requests/month | ~$0.25 | | ECR | 1 repository, ~20 GB storage | ~$0.20 | | CloudWatch Logs | ~20 GB ingested | ~$10 | | CloudTrail | Management + data events, multi-region | ~$2 | | ALB | Always-on, 24/7 | ~$18 | | VPC endpoints | 4-5 endpoints | ~$2-3 | | Backup storage (RDS snapshots) | Automated + manual | ~$5 | | **Production Subtotal** | | **~$495-500** | --- ## Summary | Environment | Monthly Estimate | Notes | |---|---|---| | Development | **~$40-45** | Light usage, single-AZ, minimal encryption | | Staging | **~$143-145** | Production-like topology, always-on | | Production (early) | **~$495-500** | Multi-AZ, auto-scaling, full encryption | | **Combined (dev + staging)** | **~$185-190** | Phase 1 budget estimate | | **All three environments** | **~$680-690** | Full deployment | ## Cost Drivers (What Will Change the Bill) 1. **Fargate compute** — the largest cost. Scales with traffic and task count. At rest, 2 tasks is the minimum. 2. **RDS instance size** — db.t3.medium for production is conservative. Could start with db.t3.small if data volume is low. 3. **S3 storage** — grows with document uploads (lab PDFs, imaging reports). Intelligent Tiering can reduce cost for infrequently accessed files. 4. **CloudWatch Logs** — grows with application log volume. Can reduce cost by adjusting log retention and log level. 5. **ALB** — fixed hourly cost. Could be eliminated in dev by running behind a simpler entry point (e.g., nginx in a single Fargate task). ## Cost Reduction Options for Phase 1 - **Dev:** Use a free-tier RDS (db.t3.micro qualifies for some free tier) or skip dev DB and use local Docker PostgreSQL. - **Dev:** Skip the ALB and use a direct Fargate task or ECS service without load balancer for local development. - **Staging:** Reduce to single task, stop when not actively testing. - **Combined dev + staging could be reduced to ~$50-80/month** with these optimizations.