From 73c5f4c16f122a81924c13d06b645710250a9f5c Mon Sep 17 00:00:00 2001 From: the chopstik |/ Date: Tue, 30 Aug 2022 11:59:41 +1200 Subject: [PATCH] Update Logger.php AWS credentials can be a security token as well as key/secret strings. Adjusting to throw when credentials missing and removing test for ['key'] allowing config to supply app appropriate credentials. --- src/Logger.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Logger.php b/src/Logger.php index f1dcd9f..aa4114c 100644 --- a/src/Logger.php +++ b/src/Logger.php @@ -83,9 +83,10 @@ protected function getCredentials() 'version' => $cloudWatchConfigs['version'], ]; - if ($cloudWatchConfigs['credentials']['key']) { - $awsCredentials['credentials'] = $cloudWatchConfigs['credentials']; + if (!isset($cloudWatchConfigs['credentials'])) { + throw new IncompleteCloudWatchConfig('Missing credentials'); } + $awsCredentials['credentials'] = $cloudWatchConfigs['credentials']; return $awsCredentials; }