You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
setup ~/.aws/credentials and ~/.aws/config files. Make sure [default] section is NOT in the credentials file.
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'
The text was updated successfully, but these errors were encountered:
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:
~/.aws/credentials
and~/.aws/config
files. Make sure[default]
section is NOT in the credentials file.assume add
command.Note: fails with
Error no section default
and now the credentials file is empty.The text was updated successfully, but these errors were encountered: