Open mancuss opened 3 years ago
We recently pushed 4.5.1 which did clean up a few shell script bugs, could you update and let me know if you hit these issues still?
The temp.txt
is created so it can store the output of awsumepy
so awsume.bat
can store it in a variable and handle the output properly, from there it should be dumping the list to stdout later on in the script.
Also note, I've experienced issues where pip install --upgrade
and pipx upgrade
(depending on how you installed awsume) don't actually update the shell scripts, so if you're still experiencing issues, one thing I've done to ensure the shell scripts are updated is to uninstall and then reinstall awsume
I'm on the latest version (4.5.3) and have the same issue:
$ awsume MY_PROFILE
Session token will expire at 2021-11-16 22:58:50
[MY_PROFILE] Role credentials will expire 2021-11-16 12:38:21
$ awsume -l
$ awsume -h
But the commands for awsumepy
do work...
This is the output for
$ awsume t-staging-developers -s --debug
[2021-11-16 14:17:52,548] main.py:main : [DEBUG] Debug logs are visible
[2021-11-16 14:17:52,548] main.py:main : [DEBUG] Executing awsume
[2021-11-16 14:17:52,548] app.py:__init__ : [DEBUG] Initalizing app
[2021-11-16 14:17:52,548] app.py:get_plugin_manager : [DEBUG] Creating plugin manager
[2021-11-16 14:17:52,549] app.py:get_plugin_manager : [DEBUG] Loading plugins
[2021-11-16 14:17:52,552] app.py:parse_args : [DEBUG] Gathering arguments
[2021-11-16 14:17:52,552] default_plugins.py:add_arguments : [INFO] Adding arguments
[2021-11-16 14:17:52,553] app.py:parse_args : [DEBUG] Parsing arguments
[2021-11-16 14:17:52,553] app.py:parse_args : [DEBUG] Handling arguments
[2021-11-16 14:17:52,553] default_plugins.py:post_add_arguments : [DEBUG] Post add arguments
[2021-11-16 14:17:52,553] default_plugins.py:post_add_arguments : [DEBUG] {"version": false, "output_profile": null, "clean": false, "profile_name": "t-staging-developers", "force_refresh": false, "show_commands": true, "unset_variables": false, "auto_refresh": false, "kill": false, "list_profiles": null, "refresh_autocomplete": false, "role_arn": null, "principal_arn": null, "source_profile": null, "external_id": null, "mfa_token": null, "region": null, "session_name": null, "role_duration": null, "with_saml": false, "with_web_identity": false, "json": null, "credentials_file": null, "config_file": null, "config": null, "list_plugins": false, "info": false, "debug": true}
[2021-11-16 14:17:52,553] app.py:get_profiles : [DEBUG] Gathering profiles
[2021-11-16 14:17:52,554] default_plugins.py:collect_aws_profiles : [INFO] Collecting AWS profiles
[2021-11-16 14:17:52,554] default_plugins.py:collect_aws_profiles : [DEBUG] Collected 4 profiles
[2021-11-16 14:17:52,554] default_plugins.py:post_collect_aws_profiles : [INFO] Post collect AWS profiles
[2021-11-16 14:17:52,554] app.py:get_credentials : [DEBUG] Getting credentials
[2021-11-16 14:17:52,554] app.py:get_credentials : [DEBUG] Pulling credentials from default awsume flow
[2021-11-16 14:17:52,554] profile.py:get_role_chain : [DEBUG] Getting role chain for [t-staging-developers]
[2021-11-16 14:17:52,554] profile.py:get_role_chain : [DEBUG] target profile: {"role_arn": "arn:aws:iam::123:role/Developers", "source_profile": "t-base", "mfa_serial": "arn:aws:iam::4567:mfa/matthias.brandt"}
[2021-11-16 14:17:52,554] profile.py:get_role_chain : [DEBUG] target profile: {"aws_access_key_id": "SECRET", "aws_secret_access_key": "SECRET", "region": "eu-central-1", "mfa_serial": "arn:aws:iam::4567:mfa/matthias.brandt"}
[2021-11-16 14:17:52,554] default_plugins.py:get_credentials : [DEBUG] Role chain: ['t-base', 't-staging-developers']
[2021-11-16 14:17:52,554] default_plugins.py:get_credentials_handler : [INFO] Getting credentials: t-base
[2021-11-16 14:17:52,555] profile.py:validate_profile : [DEBUG] Validating profile
[2021-11-16 14:17:52,555] default_plugins.py:get_session_token_credentials : [INFO] Getting session token credentials
[2021-11-16 14:17:52,555] cache.py:read_aws_cache : [DEBUG] Cache file path: /home/mb/.awsume/cache/aws-credentials-SECRET
[2021-11-16 14:17:52,555] cache.py:read_aws_cache : [DEBUG] Cache file found
[2021-11-16 14:17:52,556] cache.py:valid_cache_session : [DEBUG] Cache session is valid
[2021-11-16 14:17:52,556] aws.py:get_session_token : [DEBUG] Using cache session
Session token will expire at 2021-11-16 23:41:23
[2021-11-16 14:17:52,557] default_plugins.py:get_credentials_handler : [INFO] Getting credentials: t-staging-developers
[2021-11-16 14:17:52,557] profile.py:validate_profile : [DEBUG] Validating profile
[2021-11-16 14:17:52,557] default_plugins.py:get_credentials_handler : [DEBUG] assume_role call needed
[2021-11-16 14:17:52,557] default_plugins.py:get_assume_role_credentials : [INFO] Getting assume role credentials
[2021-11-16 14:17:52,557] aws.py:assume_role : [DEBUG] Assuming role: arn:aws:iam::789:role/Developers
[2021-11-16 14:17:52,557] aws.py:assume_role : [DEBUG] Session name: t-staging-developers
[2021-11-16 14:17:52,582] aws.py:assume_role : [DEBUG] Assuming role now
[2021-11-16 14:17:52,728] aws.py:assume_role : [DEBUG] Received role credentials
[2021-11-16 14:17:52,729] aws.py:assume_role : [DEBUG] Role credentials received
[t-staging-developers] Role credentials will expire 2021-11-16 15:17:52
[2021-11-16 14:17:52,734] app.py:export_data : [DEBUG] Exporting data
That's it. No further outputs...
Additionally the -s
option does nothing:
awsume -s t-staging-developers
When running the executable directly, I can see the output:
$ /home/mb/.local/bin/awsume -s t-staging-developers
Warning: the awsume shell script is not being sourced, please use awsume-configure to install the alias
Session token will expire at 2022-02-17 02:25:53
[t-staging-developers] Role credentials will expire 2022-02-16 15:27:06
export AWS_ACCESS_KEY_ID=xxx
export AWS_SECRET_ACCESS_KEY=xxx
export AWS_SESSION_TOKEN=xxx
export AWS_REGION=eu-central-1
export AWS_DEFAULT_REGION=eu-central-1
export AWSUME_PROFILE=t-staging-developers
export AWSUME_EXPIRATION=2022-02-16T15:27:06
/home/mb/.local/bin/awsume: line 183: return: can only `return' from a function or sourced script
Still on version 4.5.3
one thing I've done to ensure the shell scripts are updated is to uninstall and then reinstall awsume
Did that, but sadly it didn't help for me. Additionally, I've removed every file containing "awsume" in its name...
unable to replicate on PowerShell 7.3.6, with awsume 4.5.0 unable to replicate on PowerShell 7.3.6, with awsume 4.5.3
leaving this issue open as this warrants further investigation.
Hello,
Love the app, it really makes my life easier! I have a freshly installed Windows, AWSCLIV2, python 3.9.1 and AWSUME 4.5.0
I have copied
.aws/credentials
and.aws/config
files from the old machine, so I know they work, or at least worked on awsume 4.4.1credencials file:
config file:
When I run some commands I get no output, and it is kind of inconsistent, for example:
Getting similar issue with
-l
or--list-profiles
Example with debug:
EDIT: it seems to be outputting
awsume -l
to a filetemp.txt
in the current directoryAny idea what I'm doing wrong/How to fix it? Thanks! Lukasz