{"id":30183704,"url":"https://github.com/dlauck92/aws-cost-dash","last_synced_at":"2026-05-09T03:38:36.594Z","repository":{"id":303435931,"uuid":"1015054298","full_name":"dlauck92/aws-cost-dash","owner":"dlauck92","description":"AWS Cost Explorer dashboard with interactive Streamlit web UI and CLI. Features daily cost tracking, monthly comparisons, service breakdowns, CSV exports, and cost projections. Secure credential management via .env files.","archived":false,"fork":false,"pushed_at":"2025-07-07T15:30:41.000Z","size":233,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-12T11:50:33.996Z","etag":null,"topics":["aws","boto3","csv-export","panadas","plotly","python","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dlauck92.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-06T23:36:42.000Z","updated_at":"2025-07-07T15:42:20.000Z","dependencies_parsed_at":"2025-07-07T16:52:00.942Z","dependency_job_id":null,"html_url":"https://github.com/dlauck92/aws-cost-dash","commit_stats":null,"previous_names":["dlauck92/aws-cost-dash"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dlauck92/aws-cost-dash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlauck92%2Faws-cost-dash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlauck92%2Faws-cost-dash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlauck92%2Faws-cost-dash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlauck92%2Faws-cost-dash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dlauck92","download_url":"https://codeload.github.com/dlauck92/aws-cost-dash/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlauck92%2Faws-cost-dash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32806487,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","boto3","csv-export","panadas","plotly","python","streamlit"],"created_at":"2025-08-12T11:44:22.115Z","updated_at":"2026-05-09T03:38:36.585Z","avatar_url":"https://github.com/dlauck92.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS Cost Dashboard\n\nThis is a comprehensive AWS cost analysis tool that provides both a Python CLI interface and an interactive web dashboard using Streamlit. It connects to AWS Cost Explorer API to display daily spending, monthly comparisons, service breakdowns, and cost projections.\n\n## 📸 Dashboard Preview\n\n![AWS Cost Dashboard](./images/dashboard-preview.png)\n\n*Interactive web dashboard showing daily costs, monthly comparisons, and service breakdowns*\n\n## Features\n\n### 📊 **Interactive Web Dashboard** (Streamlit)\n- **Real-time cost metrics** with key performance indicators\n- **Interactive charts** showing daily cost trends and monthly comparisons\n- **Service breakdown** with pie chart and detailed cost analysis\n- **Monthly projections** based on current spending patterns\n- **CSV export functionality** for all data sets\n- **Auto-refresh** every 5 minutes with manual refresh option\n- **Responsive design** that works on desktop and mobile\n\n### 💻 **Command Line Interface**\n- Daily cost analysis for the last 30 days\n- Previous month vs current month comparison\n- Current month cost projections\n- Service-by-service cost breakdown\n\n### 🔒 **Security**\n- Uses environment variables for AWS credentials\n- Secure credential management with `.env` files\n- No hardcoded secrets in the codebase\n\n## Setup\n\n### Prerequisites\n1. Ensure Cost Explorer is enabled in your AWS account\n2. Create an IAM user with Cost Explorer permissions (or use your existing credentials)\n\n### Environment Variables Setup\n1. Create a `.env` file in the project root\n2. Add your credentials to `.env`:\n```\nAWS_ACCESS_KEY_ID=your_access_key_here\nAWS_SECRET_ACCESS_KEY=your_secret_key_here\nAWS_DEFAULT_REGION=us-east-1\n```\n\n### Install Dependencies\n```bash\npip install -r requirements.txt\n```\n\n## Usage\n\n### 🌐 **Streamlit Web Dashboard** (Recommended)\n```bash\nstreamlit run streamlit_app.py\n```\nThis will open your browser to `http://localhost:8501` with the interactive dashboard.\n\n### 💻 **Command Line Interface**\n```bash\npython main.py\n```\n\n## 📥 **Data Export**\n\nThe Streamlit dashboard provides three CSV export options:\n\n1. **Daily Costs CSV** - Individual daily cost data for the last 30 days\n2. **Service Breakdown CSV** - Cost analysis by AWS service with percentages\n3. **Summary Report CSV** - Key metrics and projections in a comprehensive report\n\n## Dashboard Features\n\n### 📈 **Key Metrics**\n- Last 30 days total spending\n- Previous month actual costs\n- Current month estimated costs\n- Month-to-date progress tracking\n\n### 📊 **Visualizations**\n- **Daily Cost Trend Chart** - Line chart showing spending patterns\n- **Monthly Comparison Chart** - Bar chart comparing month-over-month costs\n- **Service Breakdown Chart** - Pie chart showing cost distribution by AWS service\n\n### 🔄 **Data Management**\n- Automatic data caching (5-minute intervals)\n- Manual refresh capability\n- Real-time timestamp showing last update\n- Error handling with helpful troubleshooting steps\n\n## File Structure\n\n```\naws-cost-dash/\n├── main.py              # Command line interface\n├── streamlit_app.py     # Interactive web dashboard\n├── requirements.txt     # Python dependencies\n├── .env                 # AWS credentials (create this)\n├── .gitignore          # Version control exclusions\n├── images/             # Screenshots and assets\n│   └── dashboard-screenshot.png\n└── README.md           # This file\n```\n\n## AWS Permissions Required\n\nYour IAM user needs the following permissions:\n- `ce:GetCostAndUsage`\n- `ce:ListCostCategoryDefinitions`\n- `ce:GetDimensionValues`\n\nOr attach the AWS managed policy: `Billing`\n\n## Troubleshooting\n\n### Common Issues:\n1. **Invalid credentials** - Check your `.env` file format (no quotes needed)\n2. **Cost Explorer not enabled** - Enable it in your AWS Billing console\n3. **Permission denied** - Ensure your IAM user has Cost Explorer permissions\n4. **No data showing** - Verify you have actual AWS usage/costs in your account\n\n### Getting Help:\n- Check the troubleshooting steps in the dashboard\n- Verify your AWS credentials are correct\n- Ensure Cost Explorer is enabled in your AWS account\n- Make sure you have actual AWS usage to analyze\n\n## Technologies Used\n\n- **Python 3.7+**\n- **Streamlit** - Web dashboard framework\n- **boto3** - AWS SDK for Python\n- **pandas** - Data manipulation and analysis\n- **plotly** - Interactive charts and visualizations\n- **python-dotenv** - Environment variable management\n\n## License\n\nThis project is open source and available under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlauck92%2Faws-cost-dash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlauck92%2Faws-cost-dash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlauck92%2Faws-cost-dash/lists"}