I have installed aws-php-sdk in Laravel and configured it correctly where putitem / getitem working when executing through HTTP/HTTPS in the browser and curl. However, when I try to execute the same script through Laravel queue, I am getting this exceptions when trying to instantiate aws client:
local.ERROR: App\Jobs\processjob::failed(): Argument #1 ($exception) must be of type App\Jobs\Throwable, Error given, called in /var/www/html/myappname/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php on line 260 {"exception":"[object] (TypeError(code: 0): App\Jobs\processjob::failed(): Argument #1 ($exception) must be of type App\Jobs\Throwable, Error given, called in /var/www/html/myappname/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php on line 260 at /var/www/html/myappname/app/Jobs/processjob.php:46)
I am using AWS role permission to access dynamodb. I have tried to debug for hours with no luck. Please help!