awslabs / awslabs/startups

RFC: Startups without FinOps expertise need a repeatable way to audit AWS costs and quantify savings opportunities across Savings Plans, idle resources, and rightsizing using any AI coding tool.

Open
#215 0 comments 0 reactions 1 assignee Claimed by @ayn-builds View on GitHub
needs-triage rfc-proposal
Dominant language
Python
Stars
17
Forks
30
Avg merge
2d 15h
Merged PRs (30d)
36

Description

## Summary

A standalone, portable cost optimization audit prompt that any AI coding agent with AWS CLI access can execute. It runs a structured 8-phase audit covering Savings Plans analysis, zombie resource detection, rightsizing, and governance gaps - producing a dollar-quantified report with prioritized recommendations. Inspired by the existing Bill Shock Preventer agent but significantly extended in service coverage and designed as a single prompt (no Kiro CLI dependency).

## Motivation

Startups rarely have dedicated FinOps engineers. Cost optimization reviews happen ad-hoc, miss critical services, or require expensive consulting engagements. The existing Bill Shock Preventer covers basics but lacks Database Savings Plans analysis (launched Dec 2025), Compute Optimizer native idle detection, ECS/Fargate/SageMaker/Redshift checks, and several high-impact quick wins like gp2-to-gp3 migration and CloudWatch log retention cleanup.

This prompt gives a startup founder or engineer a repeatable, comprehensive audit they can run themselves in under 30 minutes using any AI tool with shell access - not just Kiro CLI

## Proposed Solution

A single markdown prompt (approximately 47K characters) structured as 8 sequential phases:

Phase 0 - Auto-discovers the AWS environment (accounts, regions, org structure, existing commitments) via CLI, then confirms scope with the user before proceeding.
Phase 1 - Validates IAM permissions, checks that Cost Explorer and Compute Optimizer are enabled, verifies CloudWatch monitoring depth.
Phase 2 - Pulls 12-month cost baseline, top services, growth trends, regional and account breakdown.
Phase 3 - Runs the full Savings Plans workflow (StartGeneration, poll, GetRecommendation for all 4 SP types including DATABASE_SP). Compares Database SP vs RI options. Uses native CurrentMinimumHourlyOnDemandSpend for safe commitment sizing.
Phase 4 - Detects zombie resources across 13+ resource types using multi-metric approaches with service-appropriate lookback windows (14 days for EC2/RDS, 32 days for NAT Gateways).
Phase 4b - Runs Compute Optimizer native idle recommendations, flags gp2 volumes, CloudWatch logs without retention, over-provisioned DynamoDB tables, unused ECR images, and Cost Optimization Hub consolidated view.
Phase 5 - Rightsizing via Compute Optimizer for EC2, ASGs, EBS, Lambda, ECS/Fargate services, and RDS databases. Includes Graviton migration analysis with the correct cpuVendorArchitectures preference parameter.
Phase 6 - Governance gaps (tagging, budgets, cost allocation tags).
Phase 7 - Asks user for preferred output format (Markdown, HTML, PDF, CSV, or console) then generates a report where every recommendation carries a dollar savings estimate.
All CLI commands and parameters were validated against the AWS Specialist Agent and current AWS documentation (Aug 2026).

## Alternatives Considered

Wrap as a Kiro agent JSON or extend existing Bill Shock Preventer agent. Rejected because it limits the audience to Kiro CLI users. The prompt format works with Claude Code, Cursor, Amazon Q CLI, or any LLM with shell access - much broader startup reach.

## Open Questions

Should this be listed as a standalone prompt entry or paired with a downloadable Kiro agent wrapper for those who prefer that format?

## Drawbacks

- Size. At 47K characters it is larger than most library entries. However, removing sections would reduce coverage below what makes it meaningfully better than the existing Bill Shock Preventer.
- Read-only. The prompt generates cleanup commands but does not auto-execute them. This is a deliberate safety choice, but some users may expect a "fix it" mode.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.