Reputation: 2942
I get this error in laravel when trying to access Queue -
Class 'Aws\Sqs\SqsClient' not found
My default queue is 'sync' and I have not required 'Sqs' anywhere in my composer.json. Then why is this happening? Is it compulsory to include it in newer versions of Laravel.
Upvotes: 11
Views: 11355
Reputation: 941
I had this config in the env file QUEUE_DRIVER=database
so in my case I had to run the command without sync or sqs
command=php /my/app/dir/artisan queue:work ...
Upvotes: 1
Reputation: 2542
First check value QUEUE_DRIVER in your .env file. In your case it must be equal to „sync“
QUEUE_DRIVER=sync
Than check your supervisor configuration file. Probably you forget to change this line:
command=php /my/app/dir/artisan queue:work **sqs** ...
to
command=php /my/app/dir/artisan queue:work **sync** ...
as it described here: https://laravel.com/docs/5.7/queues#supervisor-configuration
Upvotes: 23
Reputation: 977
unmet dependency so you need to do this
composer require aws/aws-sdk-php
Upvotes: 4
Reputation: 1038
I use this package: https://github.com/aws/aws-sdk-php-laravel
This package AWS components with works!
I recommend it to you
Upvotes: 2