Skip to main content

Export comprehensive AWS cost data for analysis and optimization

Project description

AWS Cost Export

Export comprehensive AWS cost data for analysis and optimization.

Installation

pip install awscostexport

Quick Start

# Export last 6 months of data (default)
awscostexport

# Export last 3 months
awscostexport --months 3

# Use specific AWS profile
awscostexport --profile prod-account

# Get help
awscostexport --help

That's it! Your data will be exported as a zip file.

What You Get

The script exports comprehensive AWS cost data:

  • Service breakdown - Top 10 services (marketplace excluded)
  • EC2 analysis - Purchase options, instance types, Savings Plans vs RIs
  • Database details - RDS engines, ElastiCache, DynamoDB configurations
  • Reservation analysis - Complete RI/SP coverage for all eligible services
  • Storage breakdown - EBS volume types (GP2, GP3, IO1)
  • Network costs - Data transfer, NAT gateways
  • Marketplace tracking - Separated from main costs
  • Optimization metrics - Coverage %, utilization, on-demand opportunities

Output: Single zip file with 10+ CSV files ready for analysis.

Prerequisites

  • Python 3.7 or later
  • AWS credentials with Cost Explorer read access

Output

The script creates a zip file containing all your cost data:

File Description
01_service_breakdown.csv Top 10 services by cost (excludes marketplace)
02_ec2_purchase_options.csv EC2 on-demand vs reserved vs Savings Plans
02a_ec2_instance_types.csv EC2 instance types (if EC2 in top 10)
03_rds_breakdown.csv Database configurations
03a_rds_engines.csv Database engines
04_savings_status.csv Overall Savings Plans & RI coverage metrics
05_container_services.csv ECS/EKS/Fargate data (if in top 10)
06_data_transfer_nat.csv Network costs
07_ebs_volumes.csv Storage volume types
08_marketplace_spend.csv AWS Marketplace costs (separated)
09_reservation_analysis.csv Comprehensive RI/SP analysis for all services
AWS_COST_EXPORT_SUMMARY.md Summary report

Troubleshooting

"Cannot access AWS Cost Explorer"

  • Check your IAM permissions include ce:* access
  • Verify credentials: aws sts get-caller-identity
  • Cost Explorer needs 24 hours after first activation

"No data returned"

  • Verify you have AWS costs in the time period
  • Default exports last 6 months of data

Support

Email: david.schwartz@devfactory.com

License

MIT License - See LICENSE file for details.

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

awscostexport-1.0.0.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

awscostexport-1.0.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file awscostexport-1.0.0.tar.gz.

File metadata

  • Download URL: awscostexport-1.0.0.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.15

File hashes

Hashes for awscostexport-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ca04ec8fd2ad73ff7aeed672521017ca98837e390954284be2152ab1738f52c8
MD5 a9a4a7e2438458140f2758436565f6a4
BLAKE2b-256 3ec0fe00957b1744db885270c55611ad19dc69d4f5ba3873fc2d17732e94ce2c

See more details on using hashes here.

File details

Details for the file awscostexport-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: awscostexport-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.15

File hashes

Hashes for awscostexport-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9449a6f1d6d1c0c2eb2061c753ccfd5c72c6df3e84fa54a94cac72b7f243410a
MD5 02bf9f7bfbf0d4f073c1aa2c5524bb32
BLAKE2b-256 07090ec2485fe643efd2cd8e02a42c74e29c49a667f555382dfc01f37eae719e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page