Giter Site home page Giter Site logo

trackit / aws-cost-report Goto Github PK

View Code? Open in Web Editor NEW
100.0 14.0 35.0 1.62 MB

Generate Sheets (Google, Excel and CSV) with useful information about your AWS spendings.

License: MIT License

Python 99.33% Shell 0.43% Dockerfile 0.25%
aws governance cost-optimization

aws-cost-report's Introduction

Cost report generator

Requirements

  • Install jq
  • Install the python3 dependencies: sudo pip3 install -r requirements.txt

Google Sheets API access

Follow the instructions at https://developers.google.com/sheets/api/quickstart/python to setup credentials and API access.

How to run the tool on your machine

# Print help and usage informations
$> ./run.py --help

# Run with one billing bucket and one EC2 profile
$> ./run.py --billing profile_name billing-bucket-name prefix --ec2 profile_name --xlsx-name filename

# Run with multiple billing buckets and EC2 profiles
$> ./run.py --billing profile_name billing-bucket-name prefix --billing profile_name2 billing-bucket-name2 prefix2 --ec2 profile_name --ec2 profile_name2 --xlsx-name filename

The tool is built to use AWS credentials stored in ~/.aws/credentials. If you set the profile to env, the tool will use environment variables you must supply instead.

How to run the tool with docker

The docker container do not export any data to google sheets. However it generates CSVs in the out directory, and a local spreadsheet generation will be added soon.

Use our prebuilt image

# Pull the msolution/aws-cost-report image
$> docker pull msolution/aws-cost-report

Build your own image

# Build your own msolution/aws-cost-report image
$> docker build -t msolution/aws-cost-report .

Use the docker container

# Run with one billing bucket and one EC2 profile, using env credentials
$> docker run -v /local/path/out:/root/aws-cost-report/out -e AWS_ACCESS_KEY_ID=accesskeyid -e AWS_SECRET_ACCESS_KEY=secretaccesskey -e AWS_DEFAULT_REGION=default-region -e AWS_SESSION_TOKEN=sessiontoken(optional) msolution/aws-cost-report --no-generate-sheet --billing env billing-bucket-name prefix --ec2 env --xlsx-name filename

# Run with multiple billing buckets and EC2 profiles, using your local aws credentials
$> docker run -v /path/to/credentials:/root/.aws:ro -v /local/path/out:/root/aws-cost-report/out msolution/aws-cost-report --no-generate-sheet --billing profile_name billing-bucket-name prefix --billing profile_name2 billing-bucket-name2 prefix2 --ec2 profile_name --ec2 profile_name2 --xlsx-name filename

Screenshots

Download the report example here.

Cost and variations tab

Reserved instance summary

Instance size recommendations

EC2 instances last month

aws-cost-report's People

Contributors

lfrancois avatar schubev avatar thibautcornolti avatar zanchi-r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-cost-report's Issues

Issue in deprecated xml.etree

./run.py --billing default ekanshgReport ekanshg/cur
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1555M 100 1555M 0 0 10.8M 0 0:02:23 0:02:23 --:--:-- 10.8M
Download billings for default...
'xml.etree.ElementTree.Element' object has no attribute 'getchildren'

Can you please update the packages?

Usage

I was looking for such kind of tool for a long time to do capacity management but i am not sure on how to use it and the what bucket information is needed or why API is needed.

Can you please add additional information to read me as to how to use to what are the buckets which the tools are requesting for.

Error while running the report

Hello,

Sorry for very late responds, I have hooked up some other project. Alright, here we go, I used the classic version of the run.py and I end up with below error

[ error ]
Traceback (most recent call last):
File "src/make_xlsx.py", line 630, in
main(name)
File "src/make_xlsx.py", line 612, in main
gen_weekly_variations(workbook, header_format, val_format)
File "src/make_xlsx.py", line 201, in gen_weekly_variations
with open(IN_ABSOLUTE_COST_PER_MONTH) as f:
FileNotFoundError: [Errno 2] No such file or directory: 'out/absolute.csv'
Any suggestions would be of great help.

Error while running the report-2

./run.py --billing work oscxxxx billing/xxxReport --ec2 work --xlsx-name builling

Processing billing data (1/5 - billing diff)...
Processing billing data (2/5 - instance history)...
Processing billing data (3/5 - ec2 last month)...
Traceback (most recent call last):
File "src/get_last_month_ec2_cost.py", line 38, in
instance_usage_records[(record['lineItem/UsageAccountId'], record['lineItem/ResourceId'], record['lineItem/AvailabilityZone'], record['pricing/term'], record['product/instanceType'])] += float(record['lineItem/UnblendedCost'])
KeyError: 'lineItem/ResourceId'
Processing billing data (4/5 - ebs last month)...
Traceback (most recent call last):
File "src/get_last_month_ebs_cost.py", line 41, in
ebs_usage_records[(record['lineItem/UsageAccountId'], record['lineItem/ResourceId'], record['product/region'])] += float(record['lineItem/UnblendedCost'])
KeyError: 'lineItem/ResourceId'
Processing billing data (5/5 - s3 cost)...
Generating xlsx file...
Traceback (most recent call last):
File "src/make_xlsx.py", line 630, in
main(name)
File "src/make_xlsx.py", line 619, in main
instance_summary(workbook, header_format, val_format)
File "src/make_xlsx.py", line 418, in instance_summary
with open(IN_EC2_BANDWIDTH_USAGE_LAST_MONTH) as f:
FileNotFoundError: [Errno 2] No such file or directory: 'out/last-month/ec2_bandwidth.csv'

Issue with passing parameteres

Hello , When i am executing command i am getting below erros.

Here is my command - ./run.py --billing EBS esg-ebs-costing ebs-nv --ec2 EBS --xlsx-name EBS

Errors:

Extracting 3b4b1b9eae47.1.csv.parquet...
Extracting 3b4b1b9eae47.3.csv.parquet...
Extracting 3b4b1b9eae47.4.csv.parquet...
Extracting 3b4b1b9eae47.5.csv.parquet...
Extracting 3b4b1b9eae47.7.csv.parquet...
Extracting 3b4b1b9eae47.6.csv.parquet...
Fetching ec2 data for all accounts in eu-north-1...
Fetching ec2 data for all accounts in ap-south-1...
Fetching ec2 data for all accounts in eu-west-3...
Fetching ec2 data for all accounts in eu-west-2...
Fetching ec2 data for all accounts in eu-west-1...
Fetching ec2 data for all accounts in ap-northeast-2...
Fetching ec2 data for all accounts in ap-northeast-1...
Fetching ec2 data for all accounts in sa-east-1...
Fetching ec2 data for all accounts in ca-central-1...
Fetching ec2 data for all accounts in ap-southeast-1...
Fetching ec2 data for all accounts in ap-southeast-2...
Fetching ec2 data for all accounts in eu-central-1...
Fetching ec2 data for all accounts in us-east-1...
Fetching ec2 data for all accounts in us-east-2...
Fetching ec2 data for all accounts in us-west-1...
Fetching ec2 data for all accounts in us-west-2...
Traceback (most recent call last):
File "src/get_ec2_data.py", line 73, in
compute_instance_costs = json.load(f)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
Traceback (most recent call last):
File "src/get_ec2_data.py", line 73, in
compute_instance_costs = json.load(f)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
Traceback (most recent call last):
File "src/get_ec2_data.py", line 73, in
compute_instance_costs = json.load(f)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "src/get_ec2_data.py", line 73, in
compute_instance_costs = json.load(f)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "src/get_ec2_data.py", line 73, in
compute_instance_costs = json.load(f)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "src/get_ec2_data.py", line 73, in
compute_instance_costs = json.load(f)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "src/get_ec2_data.py", line 73, in
compute_instance_costs = json.load(f)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "src/get_ec2_data.py", line 73, in
compute_instance_costs = json.load(f)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "src/get_ec2_data.py", line 73, in
compute_instance_costs = json.load(f)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "src/get_ec2_data.py", line 73, in
compute_instance_costs = json.load(f)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "src/get_ec2_data.py", line 73, in
compute_instance_costs = json.load(f)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "src/get_ec2_data.py", line 73, in
compute_instance_costs = json.load(f)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "src/get_ec2_data.py", line 73, in
compute_instance_costs = json.load(f)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "src/get_ec2_data.py", line 73, in
compute_instance_costs = json.load(f)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "src/get_ec2_data.py", line 73, in
compute_instance_costs = json.load(f)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "src/get_ec2_data.py", line 73, in
compute_instance_costs = json.load(f)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Fetched ec2 data for all accounts in eu-north-1
Fetched ec2 data for all accounts in ap-south-1
Fetched ec2 data for all accounts in eu-west-3
Fetched ec2 data for all accounts in eu-west-2
Fetched ec2 data for all accounts in eu-west-1
Fetched ec2 data for all accounts in ap-northeast-2
Fetched ec2 data for all accounts in ap-northeast-1
Fetched ec2 data for all accounts in sa-east-1
Fetched ec2 data for all accounts in ca-central-1
Fetched ec2 data for all accounts in ap-southeast-1
Fetched ec2 data for all accounts in ap-southeast-2
Fetched ec2 data for all accounts in eu-central-1
Fetched ec2 data for all accounts in us-east-1
Fetched ec2 data for all accounts in us-east-2
Fetched ec2 data for all accounts in us-west-1
Fetched ec2 data for all accounts in us-west-2
Fetching ec2 metadata for EBS in eu-north-1...
Fetching ec2 metadata for EBS in ap-south-1...
Fetching ec2 metadata for EBS in eu-west-3...
Fetching ec2 metadata for EBS in eu-west-2...
Fetching ec2 metadata for EBS in eu-west-1...
Fetching ec2 metadata for EBS in ap-northeast-2...
Fetching ec2 metadata for EBS in ap-northeast-1...
Fetching ec2 metadata for EBS in sa-east-1...
Fetching ec2 metadata for EBS in ca-central-1...
Fetching ec2 metadata for EBS in ap-southeast-1...
Fetching ec2 metadata for EBS in ap-southeast-2...
Fetching ec2 metadata for EBS in eu-central-1...
Fetching ec2 metadata for EBS in us-east-1...
Fetching ec2 metadata for EBS in us-east-2...
Fetching ec2 metadata for EBS in us-west-1...
Fetching ec2 metadata for EBS in us-west-2...
[954326812311 - eu-north-1] Getting instances metadata...
[954326812311 - ap-south-1] Getting instances metadata...
[954326812311 - eu-west-3] Getting instances metadata...
[954326812311 - eu-north-1] Done!
[954326812311 - eu-west-2] Getting instances metadata...
[954326812311 - eu-west-1] Getting instances metadata...
[954326812311 - eu-west-3] Done!
[954326812311 - ap-south-1] Done!
[954326812311 - ap-northeast-1] Getting instances metadata...
[954326812311 - eu-west-2] Done!
[954326812311 - eu-west-1] Done!
Fetched ec2 metadata for EBS in eu-north-1
[954326812311 - ap-northeast-2] Getting instances metadata...
[954326812311 - sa-east-1] Getting instances metadata...
[954326812311 - ca-central-1] Getting instances metadata...
Fetched ec2 metadata for EBS in ap-south-1
Fetched ec2 metadata for EBS in eu-west-3
[954326812311 - ap-southeast-1] Getting instances metadata...
Fetched ec2 metadata for EBS in eu-west-2
Fetched ec2 metadata for EBS in eu-west-1
[954326812311 - ap-southeast-2] Getting instances metadata...
[954326812311 - ca-central-1] Done!
[954326812311 - ap-northeast-1] Done!
[954326812311 - eu-central-1] Getting instances metadata...
[954326812311 - sa-east-1] Done!
[954326812311 - us-east-1] Getting instances metadata...
[954326812311 - ap-northeast-2] Done!
[954326812311 - us-east-2] Getting instances metadata...
[954326812311 - us-west-1] Getting instances metadata...
[954326812311 - us-west-2] Getting instances metadata...
Fetched ec2 metadata for EBS in ap-northeast-2
Fetched ec2 metadata for EBS in ap-northeast-1
Fetched ec2 metadata for EBS in sa-east-1
Fetched ec2 metadata for EBS in ca-central-1
[954326812311 - us-east-2] Done!
[954326812311 - eu-central-1] Done!
[954326812311 - us-east-1] Done!
[954326812311 - ap-southeast-2] Done!
[954326812311 - us-west-1] Done!
[954326812311 - ap-southeast-1] Done!
[954326812311 - us-west-2] Done!
Fetched ec2 metadata for EBS in ap-southeast-1
Fetched ec2 metadata for EBS in ap-southeast-2
Fetched ec2 metadata for EBS in eu-central-1
Fetched ec2 metadata for EBS in us-east-1
Fetched ec2 metadata for EBS in us-east-2
Fetched ec2 metadata for EBS in us-west-1
Fetched ec2 metadata for EBS in us-west-2
Processing billing data (1/5 - billing diff)...
Traceback (most recent call last):
File "src/get_bill_diff.py", line 65, in
first_month = preserved_months[0]
IndexError: list index out of range
Processing billing data (2/5 - instance history)...
Processing billing data (3/5 - ec2 last month)...
Processing billing data (4/5 - ebs last month)...
Processing billing data (5/5 - s3 cost)...
Generating xlsx file...
Traceback (most recent call last):
File "src/make_xlsx.py", line 630, in
main(name)
File "src/make_xlsx.py", line 612, in main
gen_weekly_variations(workbook, header_format, val_format)
File "src/make_xlsx.py", line 201, in gen_weekly_variations
with open(IN_ABSOLUTE_COST_PER_MONTH) as f:

File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "src/get_ec2_data.py", line 73, in
compute_instance_costs = json.load(f)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "src/get_ec2_data.py", line 73, in
compute_instance_costs = json.load(f)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "src/get_ec2_data.py", line 73, in
compute_instance_costs = json.load(f)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "src/get_ec2_data.py", line 73, in
compute_instance_costs = json.load(f)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "src/get_ec2_data.py", line 73, in
compute_instance_costs = json.load(f)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "src/get_ec2_data.py", line 73, in
compute_instance_costs = json.load(f)
File "/usr/lib64/python3.6/json/init.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Fetched ec2 data for all accounts in eu-north-1
Fetched ec2 data for all accounts in ap-south-1
Fetched ec2 data for all accounts in eu-west-3
Fetched ec2 data for all accounts in eu-west-2
Fetched ec2 data for all accounts in eu-west-1
Fetched ec2 data for all accounts in ap-northeast-2
Fetched ec2 data for all accounts in ap-northeast-1
Fetched ec2 data for all accounts in sa-east-1
Fetched ec2 data for all accounts in ca-central-1
Fetched ec2 data for all accounts in ap-southeast-1
Fetched ec2 data for all accounts in ap-southeast-2
Fetched ec2 data for all accounts in eu-central-1
Fetched ec2 data for all accounts in us-east-1
Fetched ec2 data for all accounts in us-east-2
Fetched ec2 data for all accounts in us-west-1
Fetched ec2 data for all accounts in us-west-2
Fetching ec2 metadata for EBS in eu-north-1...
Fetching ec2 metadata for EBS in ap-south-1...
Fetching ec2 metadata for EBS in eu-west-3...
Fetching ec2 metadata for EBS in eu-west-2...
Fetching ec2 metadata for EBS in eu-west-1...
Fetching ec2 metadata for EBS in ap-northeast-2...
Fetching ec2 metadata for EBS in ap-northeast-1...
Fetching ec2 metadata for EBS in sa-east-1...
Fetching ec2 metadata for EBS in ca-central-1...
Fetching ec2 metadata for EBS in ap-southeast-1...
Fetching ec2 metadata for EBS in ap-southeast-2...
Fetching ec2 metadata for EBS in eu-central-1...
Fetching ec2 metadata for EBS in us-east-1...
Fetching ec2 metadata for EBS in us-east-2...
Fetching ec2 metadata for EBS in us-west-1...
Fetching ec2 metadata for EBS in us-west-2...
[954326812311 - eu-north-1] Getting instances metadata...
[954326812311 - ap-south-1] Getting instances metadata...
[954326812311 - eu-west-3] Getting instances metadata...
[954326812311 - eu-north-1] Done!
[954326812311 - eu-west-2] Getting instances metadata...
[954326812311 - eu-west-1] Getting instances metadata...
[954326812311 - eu-west-3] Done!
[954326812311 - ap-south-1] Done!
[954326812311 - ap-northeast-1] Getting instances metadata...
[954326812311 - eu-west-2] Done!
[954326812311 - eu-west-1] Done!
Fetched ec2 metadata for EBS in eu-north-1
[954326812311 - ap-northeast-2] Getting instances metadata...
[954326812311 - sa-east-1] Getting instances metadata...
[954326812311 - ca-central-1] Getting instances metadata...
Fetched ec2 metadata for EBS in ap-south-1
Fetched ec2 metadata for EBS in eu-west-3
[954326812311 - ap-southeast-1] Getting instances metadata...
Fetched ec2 metadata for EBS in eu-west-2
Fetched ec2 metadata for EBS in eu-west-1
[954326812311 - ap-southeast-2] Getting instances metadata...
[954326812311 - ca-central-1] Done!
[954326812311 - ap-northeast-1] Done!
[954326812311 - eu-central-1] Getting instances metadata...
[954326812311 - sa-east-1] Done!
[954326812311 - us-east-1] Getting instances metadata...
[954326812311 - ap-northeast-2] Done!
[954326812311 - us-east-2] Getting instances metadata...
[954326812311 - us-west-1] Getting instances metadata...
[954326812311 - us-west-2] Getting instances metadata...
Fetched ec2 metadata for EBS in ap-northeast-2
Fetched ec2 metadata for EBS in ap-northeast-1
Fetched ec2 metadata for EBS in sa-east-1
Fetched ec2 metadata for EBS in ca-central-1
[954326812311 - us-east-2] Done!
[954326812311 - eu-central-1] Done!
[954326812311 - us-east-1] Done!
[954326812311 - ap-southeast-2] Done!
[954326812311 - us-west-1] Done!
[954326812311 - ap-southeast-1] Done!
[954326812311 - us-west-2] Done!
Fetched ec2 metadata for EBS in ap-southeast-1
Fetched ec2 metadata for EBS in ap-southeast-2
Fetched ec2 metadata for EBS in eu-central-1
Fetched ec2 metadata for EBS in us-east-1
Fetched ec2 metadata for EBS in us-east-2
Fetched ec2 metadata for EBS in us-west-1
Fetched ec2 metadata for EBS in us-west-2
Processing billing data (1/5 - billing diff)...
Traceback (most recent call last):
File "src/get_bill_diff.py", line 65, in
first_month = preserved_months[0]
IndexError: list index out of range
Processing billing data (2/5 - instance history)...
Processing billing data (3/5 - ec2 last month)...
Processing billing data (4/5 - ebs last month)...
Processing billing data (5/5 - s3 cost)...
Generating xlsx file...
Traceback (most recent call last):
File "src/make_xlsx.py", line 630, in
main(name)
File "src/make_xlsx.py", line 612, in main
gen_weekly_variations(workbook, header_format, val_format)
File "src/make_xlsx.py", line 201, in gen_weekly_variations
with open(IN_ABSOLUTE_COST_PER_MONTH) as f:
FileNotFoundError: [Errno 2] No such file or directory: 'out/absolute.csv'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.