awslabs / amazon-transcribe-streaming-sdk

The Amazon Transcribe Streaming SDK is an async Python SDK for converting audio into text via Amazon Transcribe.
Apache License 2.0
151 stars 38 forks source link

Authentication only works with temporary credentials. #103

Open jeb2112 opened 3 months ago

jeb2112 commented 3 months ago

The authentication works for temporary credentials as specified by AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and optionally the AWS_SESSION_TOKEN, optionally stored in .aws/credentials, as described in readme.md, but I can't get it to work with the auto-refreshing credentials. The auto-refresh credentials are in a .json file in a further sub-directory, not in the .aws/credentials file. Nothing in readme.md seems to mention this alternative, is it supported?

jeb2112 commented 3 months ago

Oh wait, I just saw the workaround in the other issue thread. Still, from what I can see the new_default_method() in auth.py ought to fall back on the ./aws/config file in the 2nd level of the chain if the environment variables aren't defined, and it doesn't seem to. I tried using the new_profile() method to access the .aws/config file directly, but got a File not Found error (but the config file is there).