Giter Club home page Giter Club logo

awscosts's People

Contributors

chanakyacool avatar gerner avatar lardcanoe avatar limitusus avatar srbartlett 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

awscosts's Issues

Fix readme code

AWSCosts.region('eu-west-1').ec2.elb.price(:standard)
should be
AWSCosts.region('eu-west-1').ec2.ebs.price(:standard)

Error on ec2_on_demand

When performing this command:

region = AWSCosts.region 'us-east-1'
region.ec2.on_demand(:linux).price

This error occurs:

/usr/local/lib/ruby/gems/2.1.0/gems/awscosts-0.0.7/lib/awscosts/ec2_on_demand.rb:56:in `fetch': undefined method `[]' for nil:NilClass (NoMethodError)
        from /usr/local/lib/ruby/gems/2.1.0/gems/awscosts-0.0.7/lib/awscosts/ec2.rb:19:in `on_demand'
        from ./test.rb:41:in `<main>'

There is no issue when performing requests on reserved or ELB class!

Reserved Instances code snippets in README throwing errors

I was copying code snippets from the README (so I've already set the region using the exact code under Usage) and I tried out the Reserved code in irb:

region.ec2.reserved(:windows, :light).upfront

Gave me this:

ArgumentError: wrong number of arguments (0 for 1)
    from /Users/victoria/.rvm/gems/ruby-1.9.3-p392/gems/awscosts-0.0.4/lib/awscosts/ec2_reserved_instances.rb:29:in `upfront'
    from (irb):7
    from /Users/victoria/.rvm/rubies/ruby-1.9.3-p392/bin/irb:16:in `'

Upon running this in irb:

region.ec2.reserved(:windows_with_sql, :medium).hourly('m1.large')

I got this:

NoMethodError: undefined method `[]' for nil:NilClass
    from /Users/victorialouie/.rvm/gems/ruby-1.9.3-p392/gems/awscosts-0.0.4/lib/awscosts/ec2_reserved_instances.rb:41:in `hourly'
    from (irb):8
    from /Users/victorialouie/.rvm/rubies/ruby-1.9.3-p392/bin/irb:16:in `'

ec2 is broken for certain regions

When attempting to use the following:

def get_region_cost(region)
  return AWSCosts.region(region).ec2.on_demand(:linux).price
end

I found that certain regions cause the following error:

test.rb:22:in `get_region_cost': undefined method `ec2' for nil:NilClass (NoMethodError)
	from test.rb:28:in `block in get_ec2_costs'
	from test.rb:27:in `each'
	from test.rb:27:in `get_ec2_costs'
	from test.rb:33:in `<main>'

The following regions cause this issue:

ap-south-1
eu-west-2
ap-northeast-2
ca-central-1
us-east-2

Basic costing example not working ..

I tried this simple code example and got a zero price back .. not sure this gem is working .. I've read recently that the JSON URL's were modified in AWS not sure if this is the cause of this GEM not working. Here's the basic code based on the docs that isn't working:

require 'rubygems'
require 'awscosts'

region = AWSCosts.region 'us-east-1'

curprice = region.ec2.on_demand(:linux).price('m1.medium')

This leaves me with a zero value in curprice variable and I'm pretty sure that's not right.

ec2 families missing

Hi, i am currently using this ruby library, and there are lots of missing missing ec2 families (m4, m3, c4 etc..) . I saw that each implementation of on_demand and reserved methods have a different translator for ec2 families, should be better to have one centralized that is obtained from the aws api directly?

httparty dependency

Just noticed `httparty' is not listed as a dependency in the gemspec, is there a reason for this?

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.