Giter Club home page Giter Club logo

spotify's Introduction

spotify

This tool is used to convert EC2 on-demand instances to spot instances with one click

Prerequisites

You must configure boto (AWS python client) before hand and set your default region

Installation

Download the reop and install required libraries
pip install -r requirements.txt

Make it so

Several options to run spotify

  • Create a spot instance from an on-demand instance, regardless of any roles, security groups or subnets python spotify.py i-01jhbdihugdiygw
  • Create a spot instance without stopping source instance. This option will require additional configuration post run python spotify.py i-01jhbdihugdiygw -k Create a spot instance and transfer some additional parameters to the new instance (e.g. EIP, Security group, IAM role) python spotify.py i-01jhbdihugdiygw -r

** Original Instance will remain stopped after the conversion**

Dry run - what can you save

  • Get an estimate for on-demand cost and spot cost for instance
$ python3 spotify.py i-08ccff8f5a4ac85d6 -d
Current instance type: t2.microv
On-demand   price: 0.0146000000
Spot        price: 0.003800
  • Get an estimate for the whole region
$ python3 spotify.py region -d

             Hourly cost of EC2
+---------------+----------------+----------------------+
| Instance Name | On demand cost |      spot cost       |
+---------------+----------------+----------------------+
|   inst-assi   |  0.0146000000  |       0.003800       |
|    nameless   |  0.0552000000  |       0.015000       |
|    Openvpn    |  0.0146000000  |       0.003800       |
|  ------------ |  ------------  |     ------------     |
|  Region cost  |     0.0844     | 0.022600000000000002 |
+---------------+----------------+----------------------+

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.