Skip to content

Commit 75ba48c

Browse files
authored
Add aws session token (#39)
* config.php: added AWS_SESSION_TOKEN support * TextToSpeechManager.php: added token field to Credentials This allows AWS to load also the AWS_SESSION_TOKEN in order for lambda to work as IAM key and secret are empty
1 parent 7dbf6b9 commit 75ba48c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

config/config.php

+1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
'credentials' => [
9797
'key' => env('AWS_ACCESS_KEY_ID', ''),
9898
'secret' => env('AWS_SECRET_ACCESS_KEY', ''),
99+
'token' => env('AWS_SESSION_TOKEN', ''),
99100
],
100101

101102
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),

src/TextToSpeechManager.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ protected function setPollyClient(array $config, Credentials $credentials)
6666
*/
6767
protected function getCredentials(array $credentials)
6868
{
69-
return new Credentials($credentials['key'], $credentials['secret']);
69+
return new Credentials($credentials['key'], $credentials['secret'], $credentials['token']);
7070
}
7171

7272
/**

0 commit comments

Comments
 (0)