feat: S3 Deep Dive, billing analysis mode, enhanced detection & dashboard#4
Open
shubhamperforce wants to merge 4 commits into
Open
feat: S3 Deep Dive, billing analysis mode, enhanced detection & dashboard#4shubhamperforce wants to merge 4 commits into
shubhamperforce wants to merge 4 commits into
Conversation
- detection_engine.py
- Auto-detect CSV format: inventory vs Cost Explorer resource-level export
- Billing analysis mode (costs.csv): parses AWS Cost Explorer resource-level
export, identifies services via ARN patterns, cross-references bare S3
bucket names, writes billing_report.json with service breakdown and top
S3 bucket cost ranking
- S3 enrichment: size_gb, access_tier (Active/Infrequent/Cold/Frozen),
days_since_access, last_accessed on all S3 findings
- detect_s3_infrequent_access(): new rule flagging 30-59 day idle buckets
for S3-IA tier (45% saving estimate)
- _build_s3_analysis(): full per-bucket analysis with termination flags for
frozen dev/sandbox buckets; writes s3_analysis.json
- CLI argument support: python3 detection_engine.py [filepath]
- dashboard.py
- S3 Deep Dive tab (new): metric cards, tier bar chart, grouped cost vs
potential-saving bar chart, days-idle timeline with 30/60/90d threshold
reference lines, savings breakdown donut, cost by environment bar,
filterable bucket cards with CLI remediation commands, termination
candidates section
- Metric cards: annual savings opportunity, % of S3 spend recoverable
- dashboard_AI.py: standalone AI-powered dashboard variant
- s3_analysis.json: sample S3 analysis output from aws_cost_data.csv
- .gitignore: excludes venv/, costs.csv, billing_report.json, SM_api_key
…orts and generated outputs
smahima27
approved these changes
May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds significant new capabilities to the Cloud Cost Waste Hunter tool, built for Perforce Global Jam 2026.
New Features
🪣 S3 Deep Dive Dashboard Tab
A dedicated S3 Deep Dive tab in the Streamlit dashboard providing full visibility into S3 bucket spend and waste:
aws s3 rbdelete commands and total deletion savings💰 AWS Cost Explorer Billing Analysis Mode
detection_engine.pynow auto-detects the CSV format on startup:costs.csvfrom Cost Explorer) → runsrun_billing_analysis()which:last_active/first_activedates per resource from per-date cost rowsbilling_report.jsonwith service breakdown, top S3 spenders, and zero-cost bucket list🔍 Enhanced S3 Waste Detection
detect_cold_s3()enriched withsize_gb,access_tier,days_since_access, andlast_accessedfieldsdetect_s3_infrequent_access()— new rule flagging buckets accessed 30–59 days ago as candidates for S3-IA tier (45% saving estimate)_build_s3_analysis()— generatess3_analysis.jsonwith full per-bucket breakdown (tier, size, cost, saving, CLI fix, termination flag) and tier summary aggregates🖥️ CLI File Argument
Both scripts now accept an optional positional filepath argument:
Changed Files
detection_engine.py_detect_csv_format,run_billing_analysis,_build_s3_analysisdashboard.py.gitignoreHow to Run