ReviewOS

stacks/ts-cloud

Implement `optimize` — opinionated cost-saving recommendations

#112
Closed glennmichael123 opened this 24 days ago · 0 comments
24 days ago

Implementation issue split out from #107.

Replace the mock-data body in packages/ts-cloud/bin/commands/cost.ts (optimize command) with real implementation. Composes resources + resources:unused + cost:breakdown into actionable recommendations:

  • Reserved Instance candidates (steady-state EC2 / RDS workloads).
  • Right-sizing (EC2 / RDS instances < 20% utilization).
  • Storage class transitions (S3 Standard → Intelligent-Tiering / Glacier).
  • Unused resources (delete recommendation, sourced from `resources:unused`).
  • CloudFront compression / caching wins (data transfer cost).

Acceptance

  • cloud optimize returns real recommendations from the connected account.
  • Each recommendation lists current cost, projected cost, savings, and the source signal (which CloudWatch metric / Cost Explorer line item triggered it).
  • --profile honored.
  • Replaces the cli.warn('not implemented') guard introduced by #107.

Notes

  • This is the heaviest of the five — depends on resources and resources:unused being real first. Last to implement.
  • Some recommendations (RI commitments, Compute Savings Plans) need account-level commitment-tracking data; can stub those with a flag (--include-commitments) once the rest is real.
  • #107 — tactical guard

Sign in to comment on this issue.