{ "info": { "author": "Terbium Labs", "author_email": "developers@terbiumlabs.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "check-reserved-instances\n--------------------------\n\n.. image:: https://img.shields.io/travis/TerbiumLabs/check-reserved-instances.svg\n :target: https://travis-ci.org/TerbiumLabs/check-reserved-instances\n\n.. image:: https://img.shields.io/coveralls/TerbiumLabs/check-reserved-instances.svg\n :target: https://coveralls.io/r/TerbiumLabs/check-reserved-instances\n\n.. image:: https://img.shields.io/pypi/pyversions/check-reserved-instances.svg\n :target: https://pypi.python.org/pypi/check-reserved-instances/\n\nCheck Reserved Instances - Compare instance reservations with running\ninstances\n\nInspired by `epheph/ec2-check-reserved-instances`_, and `pull request #5\nby DavidGoodwin`_\n\nAmazon\u2019s reserved instances are a great way to save money when using\nEC2, RDS, ElastiCache, etc. An instance reservation is specified by an\navailability zone, instance type, and quantity. Correlating the\nreservations you currently have active with your running instances is a\nmanual, time-consuming, and error prone process.\n\nThis quick little Python script uses boto3 to inspect your reserved\ninstances and running instances to determine if you currently have any\nreserved instances which are not being used. Additionally, it will give\nyou a list of non-reserved instances which could benefit from additional\nreserved instance allocations. The report may also be sent via email.\n\n`Regional Benefit Reserved Instances`_ are also supported!\n\nInstallation\n------------\n\nInstall the package using pip:\n\n::\n\n $ pip install check_reserved_instances\n\nConfiguration\n-------------\n\nA sample configuration file is provided for easy use. By default, the\nscript loads the configuration from config.ini in the current directory.\n\n::\n\n $ cp config.ini.sample config.ini\n\nConfiguring AWS Accounts/Credentials\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nMultiple AWS accounts/regions are supported! Specify one or many\nsections with name ``[AWS ]``. These are the lists of AWS\ncredentials that will be used to query for instances. Replace\n```` with a nickname will be provided in the report.\n\nThe following configuration options are supported:\n\n- **aws\\_access\\_key\\_id** (Optional str): The AWS IAM access key for a\n specific user.\n- **aws\\_secret\\_access\\_key** (Optional str): The AWS IAM secret key\n for a specific user.\n- **aws\\_role\\_arn** (Optional str): The AWS IAM role to assume to authenticate\n with if you wish to use IAM roles to authenticate across accounts. See `AWS Documentation`_ for more information.\n- **region** (Optional str): The AWS region to query for the account.\n Defaults to us-east-1. If multiple regions are desired, another\n ``[AWS ]`` section is required.\n- **rds** (Optional bool): Boolean for whether or not to check RDS\n reserved instances.\n- **elasticache** (Optional bool): Whether or not to check ElastiCache\n reserved instances.\n\nEmail Report\n~~~~~~~~~~~~\n\nThe report can be sent via email (SMTP). Specify a section with name\n``[Email]``.\n\nThe following configuration options are supported:\n\n- **smtp\\_host** (Required str): The hostname of the SMTP server.\n- **smtp\\_port** (Optional int): The port the server uses for SMTP.\n Defaults to 25.\n- **smtp\\_user** (Optional str): If your SMTP server requires\n authentication, specify a username. Defaults to None (no\n authentication).\n- **smtp\\_password** (Optional str): If your SMTP server requires\n authentication, specify a password. Defaults to None (no\n authentication).\n- **smtp\\_recipients** (Required str): The email addresses to send the\n email alert to. Specify one or many email addresses delimited by\n comma.\n\n - Example:\n\n - smtp\\_recipients = user1@company.com\n - smtp\\_recipients = user1@company.com, user2@company.com\n\n- **smtp\\_sendas** (Optional str): The email address to send the emails\n as. Defaults to ``root@localhost``.\n- **smtp\\_tls** (Optional bool): Whether or not the SMTP server should\n use TLS to connect. Defaults to False.\n\nUsage\n-----\n\nThe following optional parameter is supported:\n\n- **-\u2013config** : Specify a custom path to the configuration file.\n\nIdeally, this script should be ran in a cronjob:\n\n::\n\n # Run on the first day of every month\n 0 0 1 * * check-reserved-instances --config config.ini\n\nFor one-time use, execute the script:\n\n::\n\n $ check-reserved-instances --config config.ini\n ##########################################################\n #### Reserved Instances Report #####\n ##########################################################\n\n Below is the report on EC2 VPC reserved instances:\n UNUSED RESERVATION! (1) c4.large All Expires in [42] days.\n UNUSED RESERVATION! (1) m1.small us-east-1b Expires in [201] days.\n UNUSED RESERVATION! (1) m2.2xlarge us-east-1a Expires in [60] days.\n NOT RESERVED! (1) t1.micro us-east-1c i-sxcs34na\n NOT RESERVED! (2) m1.small us-east-1d i-dfgeqa53, i-456sdf4g\n NOT RESERVED! (3) m1.medium us-east-1d test_instance1, i-sdf3f4d6, test_instance2\n NOT RESERVED! (1) m2.2xlarge us-east-1b i-21asdf4a\n\n (23) running on-demand EC2 instances\n (18) EC2 reservations\n\n\n Not sending email for this report\n\nIn this example, you can easily see that an m2.2xlarge was spun up in\nthe wrong AZ (us-east-1b vs. us-east-1a). A c4.large regional benefit reserved instance is also unused. The\n\u201cNOT RESERVED!\u201d section shows that you could benefit from reserving:\n\n- \\(1) t1.micro\n- \\(1) m1.small (not 2, since you\u2019ll likely want to move your us-east-1b small to us-east-1d)\n- \\(3) m1.medium\n\nAdditionally, instance IDs or Name tags are provided for unreserved\ninstances, and time to expiration for unused reservations are reported.\n\nIgnoring Reservations for Running Instances\n-------------------------------------------\n\nIf you wish to ignore certain running instances when performing the calculation,\nyou may tag these instances as follows:\n\n::\n\n Key: NoReservation\n Value: True\n\n\nNOTE: This feature is currently only supported for EC2 instances.\n\nRequired IAM Permissions\n------------------------\n\nThe following example IAM policy is the minimum set of permissions\nneeded to run the reporter:\n\n::\n\n {\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Effect\": \"Allow\",\n \"Action\": [\n \"ec2:DescribeInstances\",\n \"ec2:DescribeReservedInstances\",\n \"ec2:DescribeAccountAttributes\",\n \"rds:DescribeDBInstances\",\n \"rds:DescribeReservedDBInstances\",\n \"elasticache:DescribeCacheClusters\",\n \"elasticache:DescribeReservedCacheNodes\"\n ],\n \"Resource\": \"*\"\n }\n ]\n }\n\n\nContributing\n------------\n\nBug reports and pull requests are welcome. If you would like to\ncontribute, please create a pull request against master. Include unit\ntests if necessary, and ensure that your code passes all linters (see\ntox.ini).\n\n.. _epheph/ec2-check-reserved-instances: https://github.com/epheph/ec2-check-reserved-instances\n.. _pull request #5 by DavidGoodwin: https://github.com/epheph/ec2-check-reserved-instances/pull/5\n.. _Regional Benefit Reserved Instances: https://aws.amazon.com/blogs/aws/ec2-reserved-instance-update-convertible-ris-and-regional-benefit/\n.. _AWS Documentation: http://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/TerbiumLabs/check-reserved-instances", "keywords": "ec2 elasticache rds aws reserved instances amazon web services", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "check-reserved-instances", "package_url": "https://pypi.org/project/check-reserved-instances/", "platform": "Any", "project_url": "https://pypi.org/project/check-reserved-instances/", "project_urls": { "Homepage": "https://github.com/TerbiumLabs/check-reserved-instances" }, "release_url": "https://pypi.org/project/check-reserved-instances/0.0.10/", "requires_dist": [ "boto3 (>=1.4.4)", "click", "configparser", "Jinja2", "MarkupSafe" ], "requires_python": "", "summary": "Compare instance reservations and running instances for AWS services", "version": "0.0.10" }, "last_serial": 3892662, "releases": { "0.0.10": [ { "comment_text": "", "digests": { "md5": "bcb9226e42f9de1ff5afd744a4f60d1b", "sha256": "d085ca513230390f93725db4d2a88e2b1dfdfa88bfeb28acd981f7a89f29818c" }, "downloads": -1, "filename": "check_reserved_instances-0.0.10-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bcb9226e42f9de1ff5afd744a4f60d1b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 17353, "upload_time": "2018-05-23T20:19:13", "url": "https://files.pythonhosted.org/packages/a1/be/83249e2f2f500abff56783a9da1875932824165177254a53beb5fa3c5db6/check_reserved_instances-0.0.10-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e4b2198bdec8e0d8a9e101cb6e217687", "sha256": "d40a1955546f62e88e41d025f897afab48105d4a0b986403a5c432fae8ddf883" }, "downloads": -1, "filename": "check-reserved-instances-0.0.10.tar.gz", "has_sig": false, "md5_digest": "e4b2198bdec8e0d8a9e101cb6e217687", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20091, "upload_time": "2018-05-23T20:19:14", "url": "https://files.pythonhosted.org/packages/18/29/8aad8c7287a1bf3f8005454109affb36c9bb1521c027fc858bc2b4e72ab8/check-reserved-instances-0.0.10.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "62d3976577a9e01a954b0c8f6d5a5d6c", "sha256": "5b2b76f88a825c6449db65072b37b12809e8776b4eb451355ec4bacf1e44f40c" }, "downloads": -1, "filename": "check_reserved_instances-0.0.3-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "62d3976577a9e01a954b0c8f6d5a5d6c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14920, "upload_time": "2016-09-24T05:01:10", "url": "https://files.pythonhosted.org/packages/bc/aa/a75ced9432edda39bfe2a137f49ff21320c0438dfe93b3c20c60e0361c58/check_reserved_instances-0.0.3-py2.py3-none-any.whl" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "fe1bd8959110ad4ecc0ca9e242868d2a", "sha256": "1d2b962d8941f185380419ae7806c2358186fc5cab8bb0cb0bdec483ab56a5e9" }, "downloads": -1, "filename": "check_reserved_instances-0.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fe1bd8959110ad4ecc0ca9e242868d2a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15407, "upload_time": "2017-02-19T23:47:35", "url": "https://files.pythonhosted.org/packages/db/70/e2fd5c2490a069ee35e505c2e94eb1541e6785cc3a6f9780c259dd4aab78/check_reserved_instances-0.0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9195794cf4d155d40887d4c9d403240c", "sha256": "16d177ea7c17d00473e8fc2d242818eaa68cdaf9e14d3e40a7cd9ebd38b3ac0b" }, "downloads": -1, "filename": "check-reserved-instances-0.0.4.tar.gz", "has_sig": false, "md5_digest": "9195794cf4d155d40887d4c9d403240c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16713, "upload_time": "2017-02-19T23:47:37", "url": "https://files.pythonhosted.org/packages/c9/2d/74552a29f0f95825d8762aef1e5cbf33e311ef4bcca1773247ef00917622/check-reserved-instances-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "553a689f771be53a0894d76e3313ba93", "sha256": "11b5f016be05cdaf49c6d8b306a14979e1e7887b9e47a6c23238fdef84353b76" }, "downloads": -1, "filename": "check_reserved_instances-0.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "553a689f771be53a0894d76e3313ba93", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15876, "upload_time": "2017-04-03T15:31:22", "url": "https://files.pythonhosted.org/packages/6c/ca/43221b7c3ba273feb8ad2bc3e031fbdd56d478174a0f202b458561cc277e/check_reserved_instances-0.0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "09e7afcf167bc29348102e0ac45d3093", "sha256": "5f32d46b950f7940b12d1ee4561541de05a3454c0cfd06a36e1f94db4bde47f9" }, "downloads": -1, "filename": "check-reserved-instances-0.0.5.tar.gz", "has_sig": false, "md5_digest": "09e7afcf167bc29348102e0ac45d3093", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17229, "upload_time": "2017-04-03T15:31:23", "url": "https://files.pythonhosted.org/packages/15/11/c93f97be23e1ec7146a1a1fa5d18c25a3736344a5ea430e6c6dc7dbf6d14/check-reserved-instances-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "e032c1a8d6270c0646423d61d1ee0f4d", "sha256": "fdcebd4b67bd59057496e1a66989b3e2ca47bfb17220fe231cd6c44aa17bba85" }, "downloads": -1, "filename": "check_reserved_instances-0.0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e032c1a8d6270c0646423d61d1ee0f4d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 16395, "upload_time": "2017-04-29T17:11:44", "url": "https://files.pythonhosted.org/packages/71/e1/575f9207cd9765b0830f29624eef937c8b5f5467f8768c2eccedc58a82e9/check_reserved_instances-0.0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b689a1a7d44b8f4bfc65a48cb6ffd6c1", "sha256": "0a27b2b2e853721d370ec6db6301d510d4bb4adc6c8a31e96680cb22d6abe2f3" }, "downloads": -1, "filename": "check-reserved-instances-0.0.6.tar.gz", "has_sig": false, "md5_digest": "b689a1a7d44b8f4bfc65a48cb6ffd6c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17612, "upload_time": "2017-04-29T17:11:45", "url": "https://files.pythonhosted.org/packages/68/98/753edb67a6eef7bba44dc1b9b8a4f488fb7060d07399bae434c1804afa00/check-reserved-instances-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "e5b94225c999be582e02aa7af4699c0b", "sha256": "9c1935698c72407fd4bbc33bc198347acb0fa437c6c9677ad2c79e7e122beb64" }, "downloads": -1, "filename": "check_reserved_instances-0.0.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e5b94225c999be582e02aa7af4699c0b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 17164, "upload_time": "2017-07-25T18:21:52", "url": "https://files.pythonhosted.org/packages/6e/f3/e048c01a2bd1221db13bb70ba9a30e0887ef3c99b65ce848636f4404b4c3/check_reserved_instances-0.0.7-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "16285786dc25681e54f1f9103debcb08", "sha256": "96ba7d5e6ccbba2eefed3075d4cd3568e0ae18e515292cb38556e8f5b9ac5654" }, "downloads": -1, "filename": "check-reserved-instances-0.0.7.tar.gz", "has_sig": false, "md5_digest": "16285786dc25681e54f1f9103debcb08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18158, "upload_time": "2017-07-25T18:21:53", "url": "https://files.pythonhosted.org/packages/90/b4/deb10c26a5d01f20a5819f781c4bd58da62170ba02a1a24d44a04fb80400/check-reserved-instances-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "6ff45b3d3feb3e9dc0cbf6d9b85df19c", "sha256": "fa110d4636d324e679335a2f823ba60851810d63f7d21503e9cfa31c9d73fdc2" }, "downloads": -1, "filename": "check_reserved_instances-0.0.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6ff45b3d3feb3e9dc0cbf6d9b85df19c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 17299, "upload_time": "2018-03-14T14:43:03", "url": "https://files.pythonhosted.org/packages/b2/d1/a61571299d997f991c1709c68cf2ac42b7e491578dc869ec4e204f896234/check_reserved_instances-0.0.8-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7ee3e0d71b3bf9a3350aa785641a4c01", "sha256": "01dd41b088fd0ffe519d8a4b8c830542fee22901f11482a47edc19e242a668a2" }, "downloads": -1, "filename": "check-reserved-instances-0.0.8.tar.gz", "has_sig": false, "md5_digest": "7ee3e0d71b3bf9a3350aa785641a4c01", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20019, "upload_time": "2018-03-14T14:43:04", "url": "https://files.pythonhosted.org/packages/8f/a0/83b8a8f162c369529b1220e95eddcf43bb63621993a0f58d49bddcac67cd/check-reserved-instances-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "ce60ea2873dfa8899cfb775a880985e1", "sha256": "7a24ee6f38394f33dc73bd4d99fd47970dba96ca0d5b98195ca4a3dede3fd17f" }, "downloads": -1, "filename": "check_reserved_instances-0.0.9-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ce60ea2873dfa8899cfb775a880985e1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 17313, "upload_time": "2018-04-19T19:46:48", "url": "https://files.pythonhosted.org/packages/07/99/d20780208a806aa752eb3fea8c74d8fbb26484891b83c3da5f6eb7e56e07/check_reserved_instances-0.0.9-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "19517b8fe2b9b7997d437574d6eccf6c", "sha256": "9059c2fcc5c3456cc817ad321a42867fd853af4fb6d0a07f9746cb7bbc67a4b5" }, "downloads": -1, "filename": "check-reserved-instances-0.0.9.tar.gz", "has_sig": false, "md5_digest": "19517b8fe2b9b7997d437574d6eccf6c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20074, "upload_time": "2018-04-19T19:46:50", "url": "https://files.pythonhosted.org/packages/62/92/ff2b46cc42a17a93f273928865108f62d6ea015f8b568d0a7d6caca53a80/check-reserved-instances-0.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bcb9226e42f9de1ff5afd744a4f60d1b", "sha256": "d085ca513230390f93725db4d2a88e2b1dfdfa88bfeb28acd981f7a89f29818c" }, "downloads": -1, "filename": "check_reserved_instances-0.0.10-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bcb9226e42f9de1ff5afd744a4f60d1b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 17353, "upload_time": "2018-05-23T20:19:13", "url": "https://files.pythonhosted.org/packages/a1/be/83249e2f2f500abff56783a9da1875932824165177254a53beb5fa3c5db6/check_reserved_instances-0.0.10-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e4b2198bdec8e0d8a9e101cb6e217687", "sha256": "d40a1955546f62e88e41d025f897afab48105d4a0b986403a5c432fae8ddf883" }, "downloads": -1, "filename": "check-reserved-instances-0.0.10.tar.gz", "has_sig": false, "md5_digest": "e4b2198bdec8e0d8a9e101cb6e217687", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20091, "upload_time": "2018-05-23T20:19:14", "url": "https://files.pythonhosted.org/packages/18/29/8aad8c7287a1bf3f8005454109affb36c9bb1521c027fc858bc2b4e72ab8/check-reserved-instances-0.0.10.tar.gz" } ] }