cevoaustralia / aws-google-auth

Provides AWS STS credentials based on Google Apps SAML SSO auth (what a jumble!)
MIT License
537 stars 181 forks source link

Handle invalid aws profile #101

Closed stevemac007 closed 6 years ago

stevemac007 commented 6 years ago

Small fix for #95.

Was hoping to be able to actually handle the error, but all I was able to do was find it and eat it.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.6%) to 45.406% when pulling 90dfb5bf3b51142ac1697ff84320b251b3049114 on handle-invalid-aws-profile into 91cb4f764655082631b61d8c1ba07742dbe9f6f0 on master.

stevemac007 commented 6 years ago

Actually - after trying this as it initially was it didn't really help fix the issue.

The update resets and AWS_PROFILE envvar before initialising the sts_client, then reset's it for the rest of the session - this seems to work around the stack trace and actually lets the solution work.