Error related to AWS Sqs Queue in Laravel
Asked Answered
C

4

10

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.

Charlatanism answered 11/11, 2014 at 15:32 Comment(3)
do you have any environment setup?Glyptics
@Glyptics What did you mean? I didn't get you.Charlatanism
check environmentGlyptics
T
2

I use this package: https://github.com/aws/aws-sdk-php-laravel

This package AWS components with works!

I recommend it to you

Toxinantitoxin answered 12/11, 2014 at 8:33 Comment(0)
C
19

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

Colner answered 28/12, 2018 at 8:10 Comment(1)
is it possible even though this error is coming, other jobs are working fineUnavoidable
T
4

unmet dependency so you need to do this

composer require aws/aws-sdk-php

Twodimensional answered 13/5, 2018 at 9:45 Comment(0)
T
2

I use this package: https://github.com/aws/aws-sdk-php-laravel

This package AWS components with works!

I recommend it to you

Toxinantitoxin answered 12/11, 2014 at 8:33 Comment(0)
A
1

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 ...
Astri answered 19/11, 2022 at 5:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.