Giter Club home page Giter Club logo

assume's People

Contributors

drdouglasghd avatar sanderknape avatar tquach 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

Watchers

 avatar

assume's Issues

Roles with path cannot be added

Using 0.4.0, I tried:

assume add myrole --role-arn arn:aws:iam::xxxx:role/mywonderfulpath/myrole

and it failed:

usage: assume add [-h] --role-arn ROLE_ARN [--profile PROFILE] name
assume add: error: argument --role-arn: invalid iam_role_type value: 'arn:aws:iam::xxxx:role/mywonderfulpath/myrole'

pip package assume

Hi Sander,
My team and I have been developing a framework for electricity market modelling which we have named assume. We have noticed that you also have a package on pip with the same name. As we are planning to target a large audience with our framework, we were wondering if it would be possible for you to consider renaming your package to avoid any confusion for users. We understand that this may be an inconvenience, but we would greatly appreciate your help in this matter.
Thank you for your time and consideration.

missing default profile causes assume to fail

assume fails if you don't have a default profile in ~/.aws/credentials file. Even worse than that assume will wipe out the contents of the credentials file in this scenario.

steps to repro:

  1. setup ~/.aws/credentials and ~/.aws/config files. Make sure [default] section is NOT in the credentials file.
  2. run assume add command.
    Note: fails with Error no section default and now the credentials file is empty.
➜  python -V
Python 3.7.9

➜  assume --version
0.4.0

➜  assume add myrole --profile testitorgmgnt-servicerole --role-arn arn:aws:iam::XXXXXXXXX:role/MyAccountAccessRole
Added role 'myrole' to the configuration. You can now assume this role with:

assume switch myrole

➜  assume list
myrole:
  profile: testitorgmgnt-servicerole
  role_arn: arn:aws:iam::XXXXXXXXX:role/MyAccountAccessRole

➜  assume switch myrole
Traceback (most recent call last):
  File "/Users/zaro0508/.virtualenvs/py37-default/bin/assume", line 8, in <module>
    sys.exit(main())
  File "/Users/zaro0508/.virtualenvs/py37-default/lib/python3.7/site-packages/aws_assume_role_helper/__main__.py", line 23, in main
    print(commands.switch(arguments.name))
  File "/Users/zaro0508/.virtualenvs/py37-default/lib/python3.7/site-packages/aws_assume_role_helper/commands.py", line 91, in switch
    for key in config_credentials.options('default'):
  File "/usr/local/var/pyenv/versions/3.7.9/lib/python3.7/configparser.py", line 674, in options
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'default'

Python 3.10 compatibility

Any plans to upgrade compatibility to Python 3.10? We get such errors when run with Python 3.10

Traceback (most recent call last): File "/opt/homebrew/bin/assume", line 8, in <module> sys.exit(main()) File "/opt/homebrew/lib/python3.10/site-packages/aws_assume_role_helper/__main__.py", line 14, in main commands = AWSAssumeRoleHelper() File "/opt/homebrew/lib/python3.10/site-packages/aws_assume_role_helper/commands.py", line 28, in __init__ self.config = yaml.load(stream) File "/opt/homebrew/lib/python3.10/site-packages/yaml/__init__.py", line 72, in load return loader.get_single_data() File "/opt/homebrew/lib/python3.10/site-packages/yaml/constructor.py", line 37, in get_single_data return self.construct_document(node) File "/opt/homebrew/lib/python3.10/site-packages/yaml/constructor.py", line 46, in construct_document for dummy in generator: File "/opt/homebrew/lib/python3.10/site-packages/yaml/constructor.py", line 398, in construct_yaml_map value = self.construct_mapping(node) File "/opt/homebrew/lib/python3.10/site-packages/yaml/constructor.py", line 204, in construct_mapping return super().construct_mapping(node, deep=deep) File "/opt/homebrew/lib/python3.10/site-packages/yaml/constructor.py", line 126, in construct_mapping if not isinstance(key, collections.Hashable): AttributeError: module 'collections' has no attribute 'Hashable'

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.