wallix / awless

A Mighty CLI for AWS
http://awless.io/
Apache License 2.0
4.98k stars 263 forks source link

pricer failing: fetching price for 'foo': strconv.ParseFloat: parsing "": invalid syntax #139

Open snerdish opened 7 years ago

snerdish commented 7 years ago

The Pricing inspector seems to be having trouble. Not sure if this is a windows go thing.

`PS C:\Users\foo\go\bin> .\awless.exe inspect -i pricer -e [verbose] awless v0.1.3 - loading AWS session with profile '' and region 'ap-southeast-2' [info] Running full sync before inspection (disable it with --local flag)

[extra] sync: fetched cloudformation service took 350.6837ms [extra] sync: fetched lambda service took 467.6854ms [extra] sync: fetched messaging service took 625.6852ms [extra] sync: fetched cdn service took 1.3626842s [extra] sync: fetched dns service took 2.4587317s [extra] sync: fetched storage service took 5.0679941s [extra] sync: fetched access service took 5.4482759s [extra] sync: fetched monitoring service took 20.5564768s [extra] sync: fetched infra service took 42.5428424s Fetching prices at http://ec2-price.com for region global

fetching price for 't2.large': strconv.ParseFloat: parsing "": invalid syntax fetching price for 't2.micro': strconv.ParseFloat: parsing "": invalid syntax fetching price for 't2.medium': strconv.ParseFloat: parsing "": invalid syntax fetching price for 'i3.large': strconv.ParseFloat: parsing "": invalid syntax fetching price for 'r4.large': strconv.ParseFloat: parsing "": invalid syntax fetching price for 't2.nano': strconv.ParseFloat: parsing "": invalid syntax fetching price for 'r4.xlarge': strconv.ParseFloat: parsing "": invalid syntax fetching price for 'm4.large': strconv.ParseFloat: parsing "": invalid syntax fetching price for 'm3.large': strconv.ParseFloat: parsing "": invalid syntax fetching price for 't2.small': strconv.ParseFloat: parsing "": invalid syntax fetching price for 'm4.2xlarge': strconv.ParseFloat: parsing "": invalid syntax Instance Count Estimated total/day (no EBS)


m3.large 2 r4.xlarge 1 i3.large 1 m4.2xlarge 5 m4.large 10 t2.medium 38 t2.large 10 r4.large 2 t2.small 21 t2.micro 15 t2.nano 1 $0.00 PS C:\Users\foo\go\bin> .\awless.exe --version awless version=v0.1.3` go v1.9

simcap commented 7 years ago

@snerdish Thanks for reporting.

This could be 2 things:

We will investigate that.

This pricer is indeed an inspector we implemented as a quick proof of concept for pricing awless templates and AWS infrastructure. We will be soon in the process of making it much better and reliable: using the AWS json prices files; caching them; etc...

(Note inspectors are good piece of code that can be done adn contributed by the community as well. There is actually a PR under review that has some good points as well)