Problem:
I'm on a Windows system, but using git bash as my PyCharm Terminal (so i can't set Windows Environmental Variables). I'm getting my aws_session_token via a script, which sets the new token in ~/.aws/credentials for a specific profile (not default!).
any later table operations always fail, claiming the aws_session_token is invalid. Well yes, of course it is, because it was never set, while going through the FileCredentials() logic.
The issue seems to be following part.
id and secret get set, while token does not. Why?
This is just an oversight, and the proposed solution is almost correct, though it probably should be token=profile.get('aws_session_token', None) to keep supporting token-less file credentials.
Problem: I'm on a Windows system, but using git bash as my PyCharm Terminal (so i can't set Windows Environmental Variables). I'm getting my aws_session_token via a script, which sets the new token in
~/.aws/credentials
for a specific profile (not default!).When getting a new client via
any later table operations always fail, claiming the
aws_session_token
is invalid. Well yes, of course it is, because it was never set, while going through theFileCredentials()
logic.The issue seems to be following part.
id
andsecret
get set, whiletoken
does not. Why?Proposed Solution:
If this is not a possible solution, please explain why.