Retrieves AWS Monthly Costs
Project description
aws-monthly-costs
A Python CLI tool to retrieve and report AWS monthly costs across accounts, business units, and services using AWS Cost Explorer API.
๐จ Recent Breaking Changes (v0.1.0+)
If you're upgrading from an earlier version (pre-v0.1.0), please note:
--profileis now REQUIRED: Previously optional with a hardcoded default, now you must explicitly specify an AWS profile for security--include-ssrenamed to--include-shared-services: More descriptive argument name
See the Migration Guide below for upgrade instructions.
Features
- ๐ Generate cost reports by account, business unit, or service
- ๐ Support for daily average cost calculations
- ๐ Automatic analysis Excel file with charts and formatted tables (default output)
- ๐พ Optional export of individual reports in CSV or Excel format (XLSX)
- ๐ง Customizable cost aggregations and groupings
- ๐ค Shared services cost allocation across business units
- โ Comprehensive test coverage (226 tests, 93% overall coverage)
- ๐ Security-focused design (no vulnerabilities)
- ๐ Well-documented with inline docstrings
Requirements
- Python 3.10 or higher
- AWS credentials configured (via
~/.aws/config) - Required AWS IAM permissions:
ce:GetCostAndUsage(AWS Cost Explorer)organizations:ListAccounts(AWS Organizations)organizations:DescribeAccount(AWS Organizations)sts:GetCallerIdentity(AWS STS)
Installation
From Source
git clone https://github.com/whoDoneItAgain/aws-monthly-costs.git
cd aws-monthly-costs
pip install -e .
Dependencies
The tool requires the following Python packages (automatically installed):
boto3>=1.42.17- AWS SDK for Pythonpyyaml>=6.0.3- YAML configuration file parsingopenpyxl>=3.1.5- Excel file generation
Usage
Quick Start
The simplest command to get started:
amc --profile your-aws-profile
This will:
- Query AWS Cost Explorer for the previous month's costs
- Run the three main report modes (
account,bu,service) - Generate an analysis Excel file (
./outputs/aws-monthly-costs-analysis.xlsx) with:- Formatted comparison tables
- Pie charts showing cost distribution
- Business unit, service, and account breakdowns
- Daily average calculations
Note: Individual report files are NOT generated unless explicitly requested with --output-format.
AWS Profile Setup
Before running the tool, ensure your AWS credentials are configured:
# Configure AWS CLI credentials
aws configure --profile your-profile-name
# Verify the profile exists
aws sts get-caller-identity --profile your-profile-name
The profile should have the required IAM permissions listed in the Requirements section.
Advanced Usage
Custom Time Periods
# Use month mode for last 2 full months (default)
amc --profile your-aws-profile --time-period month
# Use a specific date range
amc --profile your-aws-profile --time-period 2024-01-01_2024-12-31
# Use year mode for two-year comparison (requires 24+ months of data)
amc --profile your-aws-profile --time-period year
Month Mode (default): When you use --time-period month, the tool will:
- Fetch the last 2 complete months of AWS cost data
- Generate comparison tables and charts for these 2 months
Year Mode: When you use --time-period year, the tool will:
- Fetch the last 24 months of AWS cost data
- Split the data into two complete 12-month periods for comparison
- Generate a separate
year-analysis.xlsxfile with:- Yearly cost totals comparison
- Daily average costs for each year period
- Monthly average costs for each year period
- Comparative charts and formatted tables
Requirements for Year Mode:
- At least 24 consecutive months of AWS cost data
- Data should be non-overlapping and complete
- If insufficient data exists, you'll receive an actionable error message
Example Error Messages:
Error: Insufficient data for year analysis. Provide at least 24 consecutive,
non-overlapping months for two-year comparison. Currently have 18 months.
To generate year analysis, provide at least 24 consecutive months of data.
Use a custom date range like: --time-period YYYY-MM-DD_YYYY-MM-DD with 24+ months
Generate Individual Report Files
By default, only the analysis Excel file is created. Use --output-format to generate individual reports:
# Generate individual CSV reports (plus analysis file)
amc --profile your-aws-profile --output-format csv
# Generate individual Excel reports (plus analysis file)
amc --profile your-aws-profile --output-format excel
# Generate both CSV and Excel individual reports (plus analysis file)
amc --profile your-aws-profile --output-format both
Include Shared Services Allocation
Allocate shared services costs across business units based on percentages defined in your configuration:
amc --profile your-aws-profile --include-shared-services
Run Specific Modes
# Run only specific modes
amc --profile your-aws-profile --run-modes account bu
# Include daily average calculations
amc --profile your-aws-profile --run-modes account bu service account-daily bu-daily service-daily
Note: The analysis Excel file is only generated when all three main modes (account, bu, service) are run.
Custom Configuration File
# Use a custom configuration file
amc --profile your-aws-profile --config-file /path/to/custom-config.yaml
Debug Logging
Enable detailed logging for troubleshooting:
amc --profile your-aws-profile --debug-logging
Security Note: Debug logs may contain AWS account IDs and cost data. Use with caution in sensitive environments.
Complete Examples
# Full command with all options
amc --profile production-readonly \
--config-file ./config/prod-config.yaml \
--time-period 2024-01-01_2024-12-31 \
--output-format both \
--include-shared-services \
--run-modes account bu service account-daily bu-daily service-daily \
--debug-logging
# Year-level analysis with 24 months of data
amc --profile production-readonly \
--time-period 2023-01-01_2024-12-31 \
--include-shared-services \
--debug-logging
# Year mode (automatically fetches last 24 months)
amc --profile production-readonly \
--time-period year \
--include-shared-services
Command-Line Options
Run amc --help to see all available options:
amc --help
| Option | Required | Default | Description |
|---|---|---|---|
--profile |
Yes | None | AWS profile name from ~/.aws/config |
--config-file |
No | src/amc/data/config/aws-monthly-costs-config.yaml |
Path to configuration YAML file |
--aws-config-file |
No | ~/.aws/config |
Path to AWS credentials config file |
--include-shared-services |
No | False | Allocate shared services costs across business units |
--run-modes |
No | account bu service |
Report types to generate (space-separated) |
--time-period |
No | month |
Time period: month for last 2 months, year for year-level analysis (24+ months), or YYYY-MM-DD_YYYY-MM-DD for custom range |
--output-format |
No | None | Individual report format: csv, excel, or both (omit for analysis file only) |
--debug-logging |
No | False | Enable debug-level logging |
Configuration File
The configuration file defines business units, shared services, and service aggregation rules. Example structure:
# Business unit definitions
business_units:
Engineering:
- "123456789012" # Account IDs
- "234567890123"
Operations:
- "345678901234"
Marketing:
- "456789012345"
# Shared services accounts (optional)
shared_services:
accounts:
- "567890123456"
allocation: # Percentage allocation across BUs
Engineering: 50
Operations: 30
Marketing: 20
# Service name aggregation rules (optional)
service_aggregation:
"Compute":
- "Amazon Elastic Compute Cloud - Compute"
- "Amazon EC2 Container Service"
"Storage":
- "Amazon Simple Storage Service"
- "Amazon Elastic Block Store"
For a complete example, see the included src/amc/data/config/aws-monthly-costs-config.yaml file.
Output Files
All output files are generated in the ./outputs/ directory.
Analysis Excel File (Default Output)
File: aws-monthly-costs-analysis.xlsx
Generated automatically when running the three main modes (account, bu, service). This is the primary output and contains:
Worksheets
-
BU Costs - Business unit monthly totals comparison
- Last 2 months side-by-side
- Difference and % Difference columns
- Pie chart showing BU cost distribution
- Conditional formatting (green for savings, red for increases)
-
BU Costs - Daily Avg - Business unit daily average comparison
- Accounts for different month lengths and leap years
- Same comparison format as monthly totals
-
Top Services - Top 10 services + "Other" category
- Monthly totals with pie chart
- Aggregated based on configuration rules
-
Top Services - Daily Avg - Daily average for top services
-
Top Accounts - Top 10 accounts + "Other" category
- Monthly totals with pie chart
- Account names from AWS Organizations
-
Top Accounts - Daily Avg - Daily average for top accounts
Features
- Formatted Tables: Bold headers, light blue background (#D9E1F2)
- Conditional Formatting:
- ๐ข Green for cost decreases (savings)
- ๐ด Red for cost increases
- Pie Charts: Large, easy-to-read with data labels on slices
- Number Formatting:
- Currency format with 2 decimal places
- Percentage format for differences
- Auto-adjusted Columns: Proper width for immediate readability
- Smart Filtering: Zero-cost business units omitted from charts
Individual Report Files (Optional)
Generated only when --output-format is specified. Files are created in ./outputs/ with the naming pattern:
- CSV format:
aws-monthly-costs-{run_mode}.csv - Excel format:
aws-monthly-costs-{run_mode}.xlsx
Where {run_mode} is one of: account, bu, service, account-daily, bu-daily, service-daily
CSV Format
Simple comma-separated values file with:
- Header row with column names
- Data rows with cost values
- Easy to import into other tools
Excel Format
Formatted Excel workbook with:
- Bold headers with light blue background
- Auto-adjusted column widths
- Proper number formatting
- Professional appearance
Examples:
# Analysis file only (default)
amc --profile prod
# Creates: ./outputs/aws-monthly-costs-analysis.xlsx
# Analysis file + CSV reports
amc --profile prod --output-format csv
# Creates: ./outputs/aws-monthly-costs-analysis.xlsx
# ./outputs/aws-monthly-costs-account.csv
# ./outputs/aws-monthly-costs-bu.csv
# ./outputs/aws-monthly-costs-service.csv
# Year analysis file (when using --time-period year)
amc --profile prod --time-period year
# Creates: ./outputs/aws-monthly-costs-analysis.xlsx
# ./outputs/aws-monthly-costs-year-analysis.xlsx
Year Analysis Excel File (Year Mode)
File: aws-monthly-costs-year-analysis.xlsx
Generated when using --time-period year option. Requires at least 24 consecutive months of data. This file contains:
Worksheets
-
BU Costs - Yearly - Business unit yearly totals comparison
- Two most recent complete 12-month periods side-by-side
- Difference and % Difference columns
- Pie chart showing BU cost distribution for most recent year
- Conditional formatting (green for savings, red for increases)
-
BU Costs - Daily Avg - Business unit daily average comparison
- Accounts for different month lengths and leap years
- Same comparison format as yearly totals
-
BU Costs - Monthly Avg - Business unit monthly average comparison
- Average cost per month across each 12-month period
- Useful for normalized comparisons
-
Top Services - Yearly - Top 10 services yearly totals + "Other"
- Yearly totals with pie chart
- Aggregated based on configuration rules
-
Top Services - Daily Avg - Daily average for top services
-
Top Services - Monthly Avg - Monthly average for top services
-
Top Accounts - Yearly - Top 10 accounts yearly totals + "Other"
- Yearly totals with pie chart
- Account names from AWS Organizations
-
Top Accounts - Daily Avg - Daily average for top accounts
-
Top Accounts - Monthly Avg - Monthly average for top accounts
Features
- Formatted Tables: Bold headers, blue background (#4472C4)
- Conditional Formatting:
- ๐ข Green for cost decreases (savings)
- ๐ด Red for cost increases
- Pie Charts: Large, easy-to-read with data labels on slices
- Number Formatting:
- Currency format with 2 decimal places
- Percentage format for differences
- Auto-adjusted Columns: Proper width for immediate readability
- Year Labels: Clear identification of time periods (e.g., "Year 1 (2023-Jan - 2023-Dec)")
Architecture Overview
The application follows a modular architecture with clear separation of concerns:
aws-monthly-costs/
โโโ src/amc/
โ โโโ __main__.py # Entry point & orchestration (785 lines)
โ โโโ constants.py # Named constants (56 lines)
โ โโโ version.py # Version information
โ โโโ data/config/ # Default configuration files
โ โโโ reportexport/ # Report generation (2438 lines total)
โ โ โโโ __init__.py # Imports/exports only (16 lines)
โ โ โโโ exporters.py # CSV/Excel export functions (130 lines)
โ โ โโโ analysis.py # Analysis table creation (983 lines)
โ โ โโโ year_analysis.py # Year-level analysis (635 lines)
โ โ โโโ analysis_tables.py # Table utilities (300 lines)
โ โ โโโ calculations.py # Calculation utilities (58 lines)
โ โ โโโ formatting.py # Formatting utilities (221 lines)
โ โ โโโ charts.py # Chart creation utilities (95 lines)
โ โโโ runmodes/ # Cost calculation modules
โ โโโ common.py # Shared utilities (133 lines)
โ โโโ account/ # Account cost calculations
โ โ โโโ __init__.py # Imports/exports only (8 lines)
โ โ โโโ calculator.py # Business logic (168 lines)
โ โโโ bu/ # Business unit calculations
โ โ โโโ __init__.py # Imports/exports only (9 lines)
โ โ โโโ calculator.py # Business logic (169 lines)
โ โโโ service/ # Service cost calculations
โ โโโ __init__.py # Imports/exports only (9 lines)
โ โโโ calculator.py # Business logic (191 lines)
โโโ tests/ # Comprehensive test suite (226 tests)
Key Components
1. Main Module (__main__.py)
- Purpose: Entry point and orchestration
- Responsibilities:
- Parse command-line arguments
- Load and validate configuration
- Create AWS sessions
- Coordinate runmode execution
- Trigger report generation
- Key Functions:
parse_arguments()- CLI argument parsingconfigure_logging()- Logging setupload_configuration()- YAML config loading with validationparse_time_period()- Date range parsing and validationcreate_aws_session()- AWS session creation with validationmain()- Main orchestration logic
2. Constants Module (constants.py)
- Purpose: Centralized constants and magic values
- Contains:
- Run mode identifiers (
RUN_MODE_ACCOUNT,RUN_MODE_BUSINESS_UNIT, etc.) - Output format constants (
OUTPUT_FORMAT_CSV,OUTPUT_FORMAT_EXCEL, etc.) - AWS API dimension and metric names
- Valid choices for CLI arguments
- Run mode identifiers (
3. Run Modes
Each runmode is a separate module that:
- Queries AWS Cost Explorer API
- Processes and aggregates cost data
- Calculates daily averages (accounting for leap years)
- Returns structured cost dictionaries
Account Mode (runmodes/account/)
- Retrieves costs grouped by AWS account
- Supports pagination for large account lists
- Extracts account names from AWS Organizations
- Returns top N accounts by cost
Business Unit Mode (runmodes/bu/)
- Aggregates account costs into business units
- Supports shared services allocation
- Single optimized API call (not separate calls per BU)
- Handles leap year calculations correctly
Service Mode (runmodes/service/)
- Groups costs by AWS service
- Applies service aggregation rules from config
- Returns top N services by cost
- Handles service name variations
4. Report Export (reportexport/)
-
Purpose: Generate output files (CSV, Excel, analysis workbooks)
-
Export Modules:
exporters.py- CSV/Excel export functionsanalysis.py- Analysis Excel workbook creationyear_analysis.py- Year-level analysis Excel workbook
-
Utility Modules:
analysis_tables.py- Table creation utilitiescalculations.py- Percentage and difference calculationsformatting.py- Excel styling and formatting utilitiescharts.py- Pie chart creation and configuration
-
Main API (
__init__.py): Imports/exports only (following Python best practices)
Data Flow
1. User runs CLI command
โ
2. Parse arguments & load configuration
โ
3. Create & validate AWS session
โ
4. For each run mode:
a. Query AWS Cost Explorer API
b. Process & aggregate data
c. Calculate daily averages
โ
5. Generate reports:
a. Optional: Individual CSV/Excel files
b. Default: Analysis Excel file (if all 3 modes run)
โ
6. Save to ./outputs/ directory
Design Patterns
- Single Responsibility: Each module has one clear purpose
- DRY (Don't Repeat Yourself): Helper functions avoid code duplication
- Configuration Over Convention: Behavior customizable via YAML
- Fail-Fast: Comprehensive input validation with clear error messages
- Modular Architecture: Easy to extend with new run modes or export formats
Performance Optimizations
Applied by Performance-Optimizer Agent (see AGENT_HANDOFF.md):
- Reduced API calls: BU mode makes 1 API call instead of 2 (50% reduction)
- Efficient sorting: Direct list slicing instead of intermediate dict conversions
- Optimized Excel generation: Single-pass column width calculation
- Set-based filtering: O(1) lookups for account categorization
Troubleshooting
Common Issues
"AWS profile does not exist"
Error: AWS profile 'xyz' does not exist in /home/user/.aws/config
Solution:
# List available profiles
aws configure list-profiles
# Configure a new profile
aws configure --profile your-profile-name
# Verify the profile
aws sts get-caller-identity --profile your-profile-name
"AWS profile session is not valid"
Error: AWS profile (xyz) session is not valid
Causes:
- Invalid or expired credentials
- Incorrect profile configuration
- Missing IAM permissions
Solutions:
# Verify credentials work
aws sts get-caller-identity --profile your-profile-name
# Reconfigure the profile
aws configure --profile your-profile-name
# Check if using SSO (requires login)
aws sso login --profile your-profile-name
"Configuration file not found"
Error: Configuration file not found: /path/to/config.yaml
Solution:
# Use the default config
amc --profile your-profile-name
# Or specify correct path
amc --profile your-profile-name --config-file /correct/path/to/config.yaml
# Copy example config
cp src/amc/data/config/aws-monthly-costs-config.yaml my-config.yaml
"Invalid time period format"
Error: Invalid time period format
Solution:
# Use 'month' for last 2 months (default)
amc --profile your-profile-name --time-period month
# Or use correct date format: YYYY-MM-DD_YYYY-MM-DD
amc --profile your-profile-name --time-period 2024-01-01_2024-12-31
"Missing required configuration keys"
Error: Configuration file is missing required key(s)
Solution: Ensure your configuration file has all required sections:
# Minimum required structure
business_units:
YourBU:
- "123456789012" # At least one account ID
# Optional but recommended
shared_services:
accounts: []
allocation: {}
service_aggregation: {}
Missing IAM Permissions
Error: An error occurred (AccessDeniedException) when calling the GetCostAndUsage operation
Solution: Ensure your AWS IAM user/role has these permissions:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ce:GetCostAndUsage",
"organizations:ListAccounts",
"organizations:DescribeAccount",
"sts:GetCallerIdentity"
],
"Resource": "*"
}
]
}
Analysis File Not Generated
Issue: Running the tool but analysis Excel file is not created
Cause: Analysis file requires all three main modes (account, bu, service) to be run.
Solution:
# Use default run modes (includes all 3)
amc --profile your-profile-name
# Or explicitly specify all 3
amc --profile your-profile-name --run-modes account bu service
Empty or Incorrect Cost Data
Issue: Reports show $0 or unexpected values
Possible Causes:
- Time period has no cost data
- AWS Organizations not configured
- Cost allocation tags not enabled
- Incorrect business unit account mappings in config
Solutions:
# Enable debug logging to see API responses
amc --profile your-profile-name --debug-logging
# Verify your time period
amc --profile your-profile-name --time-period 2024-01-01_2024-01-31
# Check AWS Cost Explorer in the console to verify data exists
Debug Logging
Enable debug logging for detailed diagnostic information:
amc --profile your-profile-name --debug-logging
Debug logs include:
- AWS API request/response details
- Configuration values
- Cost calculation steps
- Account and service mapping
Security Note: Debug logs may contain:
- AWS account IDs
- Cost data
- Configuration details
Do not share debug logs in public forums without sanitizing sensitive data.
Getting Help
- Check Documentation: Review this README and
TESTING.md - Review Configuration: Ensure your YAML config is valid
- Enable Debug Logging: Use
--debug-loggingfor detailed diagnostics - Check AWS Console: Verify data exists in AWS Cost Explorer
- Review Permissions: Ensure IAM permissions are correct
- File an Issue: Open a GitHub issue with debug logs (sanitized)
Migration Guide
Upgrading from Earlier Versions to v0.1.0+
Version 0.1.0 introduced breaking changes to improve security and code quality. Follow these steps to upgrade:
Step 1: Update Command-Line Arguments
Breaking Change 1: --profile is now required
โ Old (pre-v0.1.0):
# Profile was optional with hardcoded default
amc --include-ss
amc # Used hardcoded default profile
โ New (v0.1.0+):
# Profile is now REQUIRED (more secure)
amc --profile your-profile-name --include-shared-services
Breaking Change 2: --include-ss renamed to --include-shared-services
โ Old (pre-v0.1.0):
amc --profile prod --include-ss
โ New (v0.1.0+):
amc --profile prod --include-shared-services
Step 2: Update Scripts and Automation
If you have scripts, CI/CD pipelines, or cron jobs calling amc, update them:
Before (pre-v0.1.0):
#!/bin/bash
# Old script
amc --include-ss --output-format csv
After (v0.1.0+):
#!/bin/bash
# Updated script
amc --profile production-readonly --include-shared-services --output-format csv
Step 3: Review Configuration File
The configuration file format has not changed, but validation is now stricter:
# Ensure all required keys are present
business_units:
Engineering:
- "123456789012"
# Optional sections can be empty but should exist
shared_services:
accounts: []
allocation: {}
service_aggregation: {}
Step 4: Verify
Test your new command:
# Verify it works
amc --profile your-profile-name --help
# Test with your configuration
amc --profile your-profile-name --config-file your-config.yaml
What Changed in v0.1.0
Bug Fixes (all verified with tests):
- โ Time period parsing now correctly calculates previous month
- โ Year calculation for leap years uses actual cost data year
- โ Difference calculations show signed values (negative = savings)
- โ Percentage calculations handle zero baseline correctly
- โ Configuration validation with clear error messages
- โ Improved logging when analysis file cannot be generated
Performance Improvements:
- โก BU mode API calls reduced from 2 to 1 (50% reduction)
- โก Optimized sorting algorithms
- โก Faster Excel generation
Security Enhancements:
- ๐ Required
--profileargument (no hardcoded defaults) - ๐ Comprehensive input validation
- ๐ Safe YAML loading (yaml.safe_load)
- ๐ No hardcoded credentials
- ๐ Secure error messages
Code Quality:
- ๐ 93% test coverage (226 tests)
- ๐ Comprehensive docstrings
- ๐ Named constants instead of magic values
- ๐ Extracted helper functions
- ๐ Improved code organization
Documentation:
- ๐ Updated README (this file)
- ๐ Testing guide (
TESTING.md) - ๐ Security review (
SECURITY_REVIEW.md) - ๐ Detailed test documentation (
tests/README.md)
Benefits of Upgrading
- More Secure: Required authentication profile
- More Reliable: Bug fixes and comprehensive tests
- Better Performance: Optimized API calls and algorithms
- Better Documented: Clear documentation and examples
- Better Maintained: Well-organized, testable code
Testing
The project has comprehensive test coverage. See TESTING.md for details.
Quick Test Run
# Run all tests
tox
# Run tests for specific Python version
tox -e py312
# View coverage report
tox -e py312
open htmlcov/index.html
Test Statistics
- Total Tests: 226 (all passing โ )
- Coverage: 93% overall, 100% core business logic (runmodes, calculators)
- Execution Time: < 2 seconds
- Test Types: Unit tests (200+) + Integration tests (17) + End-to-End tests (7)
See tests/README.md for detailed test documentation.
Security
The application follows security best practices:
- โ No hardcoded credentials
- โ Safe YAML loading (yaml.safe_load)
- โ Comprehensive input validation
- โ No code injection vulnerabilities
- โ Secure dependency versions
- โ Proper error handling
See SECURITY_REVIEW.md for detailed security analysis.
Contributing
Contributions are welcome! Please ensure:
- Tests pass: Run
toxbefore submitting - Code is formatted: Run
ruff format . - Linting passes: Run
ruff check . - Documentation updated: Update README if adding features
- Security: No new vulnerabilities introduced
API Documentation
For developers working with the codebase, see API_REFERENCE.md for detailed API documentation including:
- Function signatures and parameters
- Module organization
- Usage examples
- Type hints and return values
Release Process
For maintainers, see RELEASE_WORKFLOW.md for detailed instructions on:
- Creating releases with semantic versioning
- Automated changelog generation
- Dependency management
- Publishing to PyPI
Development Setup
# Clone the repository
git clone https://github.com/whoDoneItAgain/aws-monthly-costs.git
cd aws-monthly-costs
# Install in development mode
pip install -e .
# Install development dependencies
pip install tox pytest pytest-cov ruff
# Run tests
tox
# Run linting
ruff check .
# Format code
ruff format .
License
See LICENSE.md for license information.
Changelog
For a complete changelog, see CHANGELOG.md.
Version 0.1.2 (Current)
See CHANGELOG.md for recent updates.
Version 0.1.0 (2026-01-02)
Breaking Changes:
--profileargument now required (previously optional)--include-ssrenamed to--include-shared-services
Bug Fixes:
- Fixed time period parsing for previous month calculation
- Fixed year calculation for leap year handling in historical data
- Fixed difference calculations (now shows signed values)
- Fixed percentage calculations for zero baseline edge case
- Added comprehensive configuration validation
Performance:
- Reduced BU mode API calls from 2 to 1 (50% reduction)
- Optimized sorting algorithms
- Improved Excel generation performance
Testing:
- Added 112 comprehensive tests (100% coverage on core logic)
- Added integration tests
- Added edge case tests (leap years, year boundaries, etc.)
Documentation:
- Complete README rewrite with examples
- Added troubleshooting guide
- Added migration guide
- Added architecture overview
- Added security review documentation
Security:
- CodeQL security scan: 0 alerts
- No vulnerable dependencies
- Comprehensive security review completed
See AGENT_HANDOFF.md and SECURITY_REVIEW.md for detailed change logs and security analysis.
Acknowledgments
This project was comprehensively refactored and tested by specialized agents:
- Refactoring-Expert Agent: Code quality improvements
- Bug-Hunter Agent: Fixed 7 critical bugs
- Security-Analyzer Agent: Security review and hardening
- Performance-Optimizer Agent: Performance optimizations
- Test-Generator Agent: Comprehensive test suite (226 tests)
- Documentation-Writer Agent: Documentation updates
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aws_monthly_costs-0.2.0.tar.gz.
File metadata
- Download URL: aws_monthly_costs-0.2.0.tar.gz
- Upload date:
- Size: 73.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7bb6dae74c7c1dbc8c08e240efad3bc09ab785e2da26db7b50292b590d5a575
|
|
| MD5 |
a280be24d4b7c96547ef8401903157cf
|
|
| BLAKE2b-256 |
f5f0e193342b64361e52d9780aa8fd65c1013b99e997d191b68b2336036df81b
|
Provenance
The following attestation bundles were made for aws_monthly_costs-0.2.0.tar.gz:
Publisher:
pypi.yaml on whoDoneItAgain/aws-monthly-costs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aws_monthly_costs-0.2.0.tar.gz -
Subject digest:
a7bb6dae74c7c1dbc8c08e240efad3bc09ab785e2da26db7b50292b590d5a575 - Sigstore transparency entry: 804147313
- Sigstore integration time:
-
Permalink:
whoDoneItAgain/aws-monthly-costs@d8e8c5c53d4046326d3a5235c21da00d41bbd50f -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/whoDoneItAgain
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yaml@d8e8c5c53d4046326d3a5235c21da00d41bbd50f -
Trigger Event:
release
-
Statement type:
File details
Details for the file aws_monthly_costs-0.2.0-py3-none-any.whl.
File metadata
- Download URL: aws_monthly_costs-0.2.0-py3-none-any.whl
- Upload date:
- Size: 48.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2369a0ec22d20ac156ed65c6b1a70914b015c5362a874d66adb59d407d76a19
|
|
| MD5 |
8cafa6ae741895a1ba868e013d0d17a8
|
|
| BLAKE2b-256 |
1fb130f446a36a6b628bb8ea4043ec821a4618de9e42f6c30a8ea5c56d8feb4d
|
Provenance
The following attestation bundles were made for aws_monthly_costs-0.2.0-py3-none-any.whl:
Publisher:
pypi.yaml on whoDoneItAgain/aws-monthly-costs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aws_monthly_costs-0.2.0-py3-none-any.whl -
Subject digest:
c2369a0ec22d20ac156ed65c6b1a70914b015c5362a874d66adb59d407d76a19 - Sigstore transparency entry: 804147316
- Sigstore integration time:
-
Permalink:
whoDoneItAgain/aws-monthly-costs@d8e8c5c53d4046326d3a5235c21da00d41bbd50f -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/whoDoneItAgain
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yaml@d8e8c5c53d4046326d3a5235c21da00d41bbd50f -
Trigger Event:
release
-
Statement type: