GithubHelp home page GithubHelp logo

jantman / awslimitchecker Goto Github PK

View Code? Open in Web Editor NEW
516.0 516.0 189.0 2.52 MB

A script and python package to check your AWS service limits and usage via boto3.

Home Page: http://awslimitchecker.readthedocs.org/

License: GNU Affero General Public License v3.0

Python 99.81% Dockerfile 0.03% Shell 0.16%
aws python

awslimitchecker's People

Contributors

andrewmichael avatar bastianzim avatar bergkampsliew avatar bflad avatar di1214 avatar djkiourtsis avatar dsumsky-infor avatar felixkrohn avatar hltbra avatar hortau-ci avatar jantman avatar jmcarp avatar john-aws avatar kilsbo avatar lpbedard avatar nadlerjessie avatar nicksantamaria avatar nitrocode avatar owenmann avatar pdecat avatar philchristensen avatar rashidamiri avatar reshadp avatar robpickerill avatar saratlingamarla avatar sebasrp avatar tagadapoe avatar tamsky avatar timgebert avatar vincentclee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

awslimitchecker's Issues

Verify IAM permissions

Verify that all checks work correctly using an IAM user with IAM permissions matching what ALC generates.

Move EBS-related limits to EBS service

Trusted Advisor lists EBS-related limits as their own service, even though they appear under EC2 in the AWS docs. Move them so they play nice with TA.

No module named services

Tried the install directions per the README on Ubuntu 14.04 and Amazon Linux. I was not able to install the module from pip directly so I attempted to install it via source with a 'python setup.py install'. When trying to run the binary I get an error "ImportError: No module named services" using python 2.7.

Any chance this will get back into the pip library? Or is there some other issue when I am installing this?

root@ip-10-0-4-112:~# /usr/local/bin/awslimitchecker
Traceback (most recent call last):
File "/usr/local/bin/awslimitchecker", line 9, in
load_entry_point('awslimitchecker==0.1.0', 'console_scripts', 'awslimitchecker')()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 351, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2363, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2088, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "build/bdist.linux-x86_64/egg/awslimitchecker/runner.py", line 46, in
File "build/bdist.linux-x86_64/egg/awslimitchecker/checker.py", line 40, in
ImportError: No module named services

AGPL source handling

  • implement source discovery, the best we can, for AGPL compliance. We should test to see if it's installed from a package or git. If from a package, point to either GitHub or PyPi. If from git, point to the repo url. In #6 instruct that anyone modifying the source must ensure this function works.

Handle API requests with markers

For boto requests that have max_results and return a marker, we need to handle iterating the marker. The most logical way to do this is probably a utility function that takes the boto connection object, the method name, and a dict of args, and returns the combined responses.

Version and URL information

Fill out project_url and version to find the actually-installed version and source, even if it's from package vs git.

Logging

Ensure logging is being done in all logical places. Adjust runner logging format (maybe based on verbosity?)

AGPL docs

Since many people may be unfamiliar with it, add some docs on AGPL, what it means to you, how to be compliant, etc.

Fix AGPL warning

Fix the AGPL message on init. How can this be done nicer? Maybe just print, or to stderr?

ToDos

Grep -i source and docs for "todo" and "tbd"

runner dump data in JSON

runner should have an option to return output - at least services, limits, usage, check results - in JSON

Docs about regions

Add documentation on regions - currently only one at a time, and from boto config.

Trusted Advisor on accounts without Support

polling the TA checks on a basic account without Support throws an exception. Handle this, and log a warning. Confirm that this is correct per AWS docs (shouldn't even free accounts have access to a limited subset of checks?)

Integration tests fail for Pull Requests in Travis

See e.g. https://travis-ci.org/jantman/awslimitchecker/jobs/72610593#L711

When Travis checks out a pull request, it checks out the merge of the PR to master, i.e. git fetch origin +refs/pull/45/merge. The git-based integration tests (Test_AGPLVersionChecker_Acceptance.test_install_git_e_dirty, Test_AGPLVersionChecker_Acceptance.test_install_git_e and Test_AGPLVersionChecker_Acceptance.test_install_git) attempt to install awslimitchecker from GitHub using the commit hash of the current git checkout that the tests exist in - which, in this case, is the merge hash, which doesn't exist yet in the repo.

Options that I can think of:
(1) don't just check out whatever hash the test repo is at, if it doesn't exist in origin.
(2) Look at the value of the TRAVIS_PULL_REQUEST environment variable, and do something different in the integration tests if we're testing a PR (such as installing +refs/pull/$TRAVIS_PULL_REQUEST/merge instead of the SHA).

Trusted Advisor

Attempt to pull limits from Trusted Advisor where possible.

This also needs to include updating docs:

  • overall docs on TA
  • development - adding services/limits, adding TA checks
  • CLI examples
  • Generated TA info, and comment on limits where they pull from TA

setup hosted services

  1. cut a 'develop' branch, start doing work there
  2. Open the repo
  3. Setup badges and ancillary services:
    1. RTD
    2. Travis CI
    3. landscape.io
    4. codecov.io
  4. Make sure that badges and ancillary services work, including RTD.
  5. Blog post and tweet.

Threshold overrides

  • checker needs ability to set threshold overrides per-limit or as a dict, either percentage or integer
  • expose this in runner as either per-limit options or a dict

Integration tests

Each function or class that actually interacts with the AWS API should have integration tests. They should run in a fake $HOME to prevent any ~/.boto / ~/.aws credentials from being used. The tests should require AWS credentials exported as env vars, and should check usage. Maybe we just want one overall integration test that runs checker(). We want to catch (a) any bad boto or AWS calls that raise exceptions, (b) any IAM permissions errors, and (c) any limits that didn't get their usage checked. The test should also confirm that the IAM policy for the user it's running under matches what awslimitchecker wants.

Support s3 service

As far as I can find, the only limit on buckets is the 100 total buckets per account.

Need to make sure that if we're checking this, we're looking at cross-region (is this easily possible?)

Add support for spot instance

Just came across this useful tool. Can you please tell me if you plan to add support for reporting on spot instances when running awslimitchecker -u? Most of our instances are spot and this would help very much. Thanks for considering this.

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.