Code Monkey home page Code Monkey logo

awespottr's Introduction

awespottr

Find the cheapest EC2 spot prices across all regions

npmjs.com Version

Usage

When installed globally with npm install -g awespottr, you can run awespottr on the command line:

  • Get help: awespottr -h

  • Get spot prices for a g2.8xlarge instance: awespottr g2.8xlarge

  • Specify an AWS CLI profile (credentials): AWS_PROFILE=awespottr awespottr m4.large

  • Limit results to a specific region: awespottr --region us-west-2 c4.xlarge

IAM Policy

awespottr must be run with an IAM role or user with permissions to get information about AWS regions, availability zones, and spot price history.

This IAM policy contains the minimum permissions required for running awespottr:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Stmt1470583998000",
            "Effect": "Allow",
            "Action": [
                "ec2:DescribeAvailabilityZones",
                "ec2:DescribeRegions",
                "ec2:DescribeSpotPriceHistory"
            ],
            "Resource": [
                "*"
            ]
        }
    ]
}

Example Output

Running awespottr m4.2xlarge should produce output like:

Checking spot prices for m4.2xlarge instance type.

AWS Zone                 Hourly Rate
------------------------ ------------
eu-west-1b               $0.063000
eu-central-1a            $0.067000
eu-central-1b            $0.072700
ap-northeast-2c          $0.073300
ap-southeast-2b          $0.078100
us-west-2c               $0.078100
ap-southeast-1a          $0.079800
ap-southeast-1b          $0.081200
eu-west-1c               $0.086200
ap-northeast-1a          $0.086600
us-east-1e               $0.088900
ap-northeast-1c          $0.090200
us-west-1c               $0.091600
us-west-1b               $0.096700
ap-northeast-2a          $0.096800
eu-west-1a               $0.099200
ap-southeast-2a          $0.099600
ap-southeast-2c          $0.103100
us-east-1a               $0.178500
ap-south-1a              $0.292000
us-west-2b               $0.390700
ap-south-1b              $0.430000
us-east-1c               $0.479000
us-west-2a               $1.000000
us-east-1d               $1.500000

Cheapest hourly rate for m4.2xlarge is $0.063000 in zone eu-west-1b

awespottr's People

Contributors

arithmetric avatar

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.