From eff5c34d046a482d5d29dfb0ccff3287aacd9948 Mon Sep 17 00:00:00 2001 From: Kevin Iuretig Date: Wed, 15 Nov 2023 03:05:54 +0100 Subject: [PATCH 1/2] config.php: added AWS_SESSION_TOKEN support --- config/config.php | 1 + 1 file changed, 1 insertion(+) diff --git a/config/config.php b/config/config.php index 12e679d..af75341 100644 --- a/config/config.php +++ b/config/config.php @@ -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'), From ee1bafbd2f1ba99beaf84feb937327ba82e4b57e Mon Sep 17 00:00:00 2001 From: Kevin Iuretig Date: Wed, 15 Nov 2023 03:08:40 +0100 Subject: [PATCH 2/2] 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 --- src/TextToSpeechManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TextToSpeechManager.php b/src/TextToSpeechManager.php index 83c2d6d..e4fa7d1 100644 --- a/src/TextToSpeechManager.php +++ b/src/TextToSpeechManager.php @@ -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']); } /**