halkujabra
halkujabra

Reputation: 2942

Error related to AWS Sqs Queue in Laravel

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

Answers (4)

Naser Nikzad
Naser Nikzad

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

Anton Ganichev
Anton Ganichev

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

muya.dev
muya.dev

Reputation: 977

unmet dependency so you need to do this

composer require aws/aws-sdk-php

Upvotes: 4

Adil
Adil

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

Related Questions