Closed giulioprinaricotti closed 5 months ago
Hi, as far as I know, this is indeed a variant of this bug: https://github.com/laravel/framework/pull/44979
Everything looks ok in your config, except you don't need to define SQS_PREFIX
(I'd remove it completely).
Also are you sure the error is related to SQS and not S3? (because in most reports people had problems with the S3 config).
Are you also 100% sure the Laravel-Bref bridge's service provider is correctly registered? It should automatically set up the token:
https://github.com/brefphp/laravel-bridge/blob/master/src/BrefServiceProvider.php#L48-L51
Maybe you have a specific config that is not the default (e.g. a SQS connection not called sqs
, or a S3 driver not called s3
?)
Found the issue. I had vapor in my packages due to a previous attempt on vapor. For some reason, it intercepts the SQS connection and does not indeed have the fix that removes token
from the configuration used to build the SqsClient.
Closing this one. Thanks!
Error
Invalid configuration value provided for "token". Expected Aws\Token\TokenInterface|Aws\CacheInterface|array|bool|callable, but got string(872)
This is similar to
https://github.com/aws/aws-sdk-php/issues/2567 https://github.com/brefphp/bref/issues/1330 (closed, tried the provided answer without success)
I'm using a serverless.yml SQS configuration similar to #103 and https://bref.sh/docs/laravel/queues.
I've also tried to use the version in getting-started/serverless.yml that uses
iam
andresources.Queue
to build the infrastructure instead.In both cases I see the queue created correctly in SQS but when I try to dispatch anything (events or jobs) I receive
Invalid configuration value provided for "token". Expected Aws\Token\TokenInterface|Aws\CacheInterface|array|bool|callable, but got string(872)
I've tried to add this line in
queue.sqs
config to no avail.My configuration
queue.php
composer installed packages
Full
serverless.yml
for reference