-
Notifications
You must be signed in to change notification settings - Fork 3
[CC-008] Org mode skips usage type filtering #20
Copy link
Copy link
Open
Labels
Description
Description
When running in AWS Organization mode (--org-costs), usage type filtering may be skipped, potentially including non-backup costs in the output.
Location
- File:
cost_collect.py- Organization cost collection logic
Impact
- Medium - Inflated cost numbers in org mode
- Inconsistent results between single-account and org modes
Suggested Fix
Ensure the same usage type filters are applied regardless of collection mode:
# Should apply to both single-account and org modes
BACKUP_USAGE_TYPES = [
'SnapshotUsage',
'CreateSnapshot',
'Storage',
...
]
def filter_backup_costs(costs: list, mode: str) -> list:
"""Filter to backup-related costs only."""
# Same logic for both modes
return [c for c in costs if c['usage_type'] in BACKUP_USAGE_TYPES]Priority
Medium
Source
cost_collect.py code review - CC-008
Reactions are currently unavailable