Giter Site home page Giter Site logo

py-spotcheck's Introduction

SpotCheck

A simple CLI tool to check the spot prices of AWS EC2 instances. This tool is utilized to check the recent prices of spot instances for different instance type, so the user can make an informed decision on the price to set for spot instances.

Background

Spot Instances are a good resource to use AWS EC2 instances for fairly cheap, and I am very frugal. This tool allows me (and you, the user) to check historical prices of spot instances to make an informed decision on the prices to set when creating an EC2 instance.

Installation

To install, use pip such that

pip3 install --user spotcheck

Setup

Since spotcheck uses boto3, you'll have to setup the same way. You can view the docs here

Usage

To use, run

spotcheck

and a series of questions will be prompted.

The results is of the form

+------------------+-------------------+---------------+--------------+---------------+
| Timestamp        | Availability Zone | Instance Type | Product Desc | Spot Price($) |
+------------------+-------------------+---------------+--------------+---------------+
| 2017-11-28 01:00 | ca-central-1a     | t2.micro      | Linux/UNIX   | 0.006100      |
| 2017-11-28 01:00 | ca-central-1b     | t2.micro      | Linux/UNIX   | 0.006100      |
| 2017-11-29 01:00 | ca-central-1a     | t2.micro      | Linux/UNIX   | 0.006100      |
        .                   .                   .               .           .
        .                   .                   .               .           .
        .                   .                   .               .           .
        .                   .                   .               .           .
+------------------+-------------------+---------------+--------------+---------------+

Repeatable Usage

If you don't want to enter the CLI every time, you can run the CLI with the options

spotcheck --InstanceType=t2.micro --ProductDescription=Linux/UNIX --StartTime=$(date -d "3 days ago" +"%Y-%m-%d") --EndTime=$(date +"%Y-%m-%d")

Version

  • 1.0.x

    • Fix Bugs
  • 1.0.0

    • First publish

py-spotcheck's People

Contributors

joeyism avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  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.