I've been using mfa.py fine without problem. Its been about 2 week since last used and now running python3 mfa.py --profile wpfc01-usgovwest1 --region us-gov-west-1 I'm getting following error
INFO:modules.logger:Validating credentials for profile: wpfc01-usgovwest1 INFO:modules.logger:Short term credentials section wpfc01-usgovwest1 is missing, obtaining new credentials. WARNING:modules.logger:Your existing credentials are missing or invalid, obtaining new credentials. Failed to get a session with STSThe config profile (dummy) could not be found Traceback (most recent call last): File "/Users/jperez/vtdev/aws-mfa/mfa.py", line 113, in <module> main() File "/Users/jperez/vtdev/aws-mfa/mfa.py", line 104, in main client = vtmfa.get_sts_client(config_settings[1],config_settings[2],args.region, args) File "/Users/jperez/vtdev/aws-mfa/modules/mfa.py", line 88, in get_sts_client return client UnboundLocalError: local variable 'client' referenced before assignment
I tried running with --log-level DEBUG --force hoping for clues but none found.
My ~/.aws/credentials still has
[wpfc01-usgovwest1-long-term] aws_access_key_id = REDACTED aws_secret_access_key = REDACTED aws_mfa_device = REDACTED
I've been using mfa.py fine without problem. Its been about 2 week since last used and now running
python3 mfa.py --profile wpfc01-usgovwest1 --region us-gov-west-1
I'm getting following errorINFO:modules.logger:Validating credentials for profile: wpfc01-usgovwest1 INFO:modules.logger:Short term credentials section wpfc01-usgovwest1 is missing, obtaining new credentials. WARNING:modules.logger:Your existing credentials are missing or invalid, obtaining new credentials. Failed to get a session with STSThe config profile (dummy) could not be found Traceback (most recent call last): File "/Users/jperez/vtdev/aws-mfa/mfa.py", line 113, in <module> main() File "/Users/jperez/vtdev/aws-mfa/mfa.py", line 104, in main client = vtmfa.get_sts_client(config_settings[1],config_settings[2],args.region, args) File "/Users/jperez/vtdev/aws-mfa/modules/mfa.py", line 88, in get_sts_client return client UnboundLocalError: local variable 'client' referenced before assignment
I tried running with
--log-level DEBUG --force
hoping for clues but none found. My~/.aws/credentials
still has[wpfc01-usgovwest1-long-term] aws_access_key_id = REDACTED aws_secret_access_key = REDACTED aws_mfa_device = REDACTED
Any help/clues would be greatly appreciated