diff --git a/BusServiceProvider.php b/BusServiceProvider.php index 4031e15..ae0c362 100644 --- a/BusServiceProvider.php +++ b/BusServiceProvider.php @@ -69,10 +69,10 @@ protected function registerBatchServices() ]; if (! empty($config['key']) && ! empty($config['secret'])) { - $dynamoConfig['credentials'] = Arr::only( - $config, - ['key', 'secret', 'token'] - ); + $dynamoConfig['credentials'] = Arr::only($config, ['key', 'secret']); + if (! empty($config['token'])) { + $dynamoConfig['credentials']['token'] = $config['token']; + } } return new DynamoBatchRepository(