Skip to content

Commit

Permalink
Add aws session token (#39)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
yurik94 authored Dec 12, 2023
1 parent 7dbf6b9 commit 75ba48c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
'credentials' => [
'key' => env('AWS_ACCESS_KEY_ID', ''),
'secret' => env('AWS_SECRET_ACCESS_KEY', ''),
'token' => env('AWS_SESSION_TOKEN', ''),
],

'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
Expand Down
2 changes: 1 addition & 1 deletion src/TextToSpeechManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ protected function setPollyClient(array $config, Credentials $credentials)
*/
protected function getCredentials(array $credentials)
{
return new Credentials($credentials['key'], $credentials['secret']);
return new Credentials($credentials['key'], $credentials['secret'], $credentials['token']);
}

/**
Expand Down

0 comments on commit 75ba48c

Please sign in to comment.