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
142 stars 37 forks source link

Credentials issue #49

Closed marinos123 closed 3 years ago

marinos123 commented 3 years ago

is it possible to authenticate to aws using the awskey and secret key through the TranscribeStreamingClient instead of using the aws cli?

nateprewitt commented 3 years ago

Hi @marinos123, we provide a few ways to use credentials in the README. You should be able to use the CLI, Credentials specified in environment variables, or with a profile in ~/.aws/credentials.

If you're looking to specify credentials manually for your client, you may be interested in our StaticCredentialResolver. You can instantiate it as shown below and pass it to your TranscribeStreamingClient as the credential_resolver.

e.g.

cred_resolver = StaticCredentialResolver(
    access_key_id="AKIDEXAMPLE",
    secret_access_key="Secret12345",
    session_token="session_1"
)

client = TranscribeStreamingClient(region="us-west-2", credential_resolver=cred_resolver)
marinos123 commented 3 years ago

Thanks a lot for the help!