Giter Club home page Giter Club logo

ec2-check-reserved-instances's Introduction

ec2-check-reserved-instances

EC2 Check Reserved Instances - Compare instance reservations with running instances

Amazon's reserved instances (ec2-describe-reserved-instances, ec2-describe-reserved-instances-offerings) are a great way to save money when using EC2. An EC2 instance reservation is specified by an availability zone, instance type, and quantity. Correlating the reservations you currently have active with your running instances is a manual, time-consuming, and error prone process.

This quick little Python script uses boto to inspect your reserved instances and running instances to determine if you currently have any reserved instances which are not being used. Additionally, it will give you a list of non-reserved instances which could benefit from additional reserved instance allocations.

To use the program, make sure you have boto installed. If you don't already have it, run:

$ python setup.py install

The only configuration needed is your AWS keys. See the boto docs to learn how to configure your credentials.

EXAMPLE OUTPUT

$ ec2-check-reserved-instances --region eu-west-1

UNUSED RESERVATION!	(1)	m3.large	linux	vpc	eu-west-1c
UNUSED RESERVATION!	(4)	m1.medium	linux	vpc	eu-west-1c
UNUSED RESERVATION!	(1)	m3.large	linux	vpc	eu-west-1a
UNUSED RESERVATION!	(4)	m1.medium	linux	vpc	eu-west-1a
UNUSED RESERVATION!	(2)	t2.small	linux	vpc	eu-west-1b
UNUSED RESERVATION!	(1)	m4.large	linux	vpc	eu-west-1b
UNUSED RESERVATION!	(1)	t2.medium	linux	vpc	eu-west-1a
UNUSED RESERVATION!	(1)	t2.large	linux	vpc	eu-west-1b
UNUSED RESERVATION!	(2)	m3.large	linux	vpc	eu-west-1b

Instance not reserved:	(1)	t2.large	linux	vpc	eu-west-1c
Instance not reserved:	(1)	m1.medium	linux	ec2	eu-west-1b
Instance not reserved:	(4)	m1.medium	linux	ec2	eu-west-1c
Instance not reserved:	(2)	m1.large	linux	ec2	eu-west-1b
Instance not reserved:	(1)	m4.large	windows	vpc	eu-west-1b
Instance not reserved:	(2)	c4.large	linux	vpc	eu-west-1a
Instance not reserved:	(4)	m1.medium	linux	ec2	eu-west-1a
Instance not reserved:	(1)	m1.large	linux	ec2	eu-west-1a
Instance not reserved:	(1)	t2.large	linux	vpc	eu-west-1a
Instance not reserved:	(1)	c1.medium	linux	ec2	eu-west-1c
Instance not reserved:	(2)	t2.small	windows	vpc	eu-west-1b

(39) running on-demand instances
(36) reservations
(17) unused reservations

$ ec2-check-reserved-instances --region eu-west-1 --service rds

RDS Checks
==========
UNUSED RESERVATION!	(1)	db.t2.small	mysql	True
Congratulations, you have no unreserved instances

(5) running on-demand instances
(6) rds reservations
(1) unused rds reservations

ec2-check-reserved-instances's People

Contributors

dali-marka avatar epheph avatar dsummersl avatar oba11 avatar

Watchers

James Cloos avatar  avatar

Forkers

markavip

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.