I'm trying to consume messages from SQS with the symfony 5 SQS consumer and i'm having an issue when the aws secret key contains special chars like +
or \
.
Here's my .env
file :
MESSENGER_TRANSPORT_DSN="https://sqs.eu-west-3.amazonaws.com/XXXXXXXX/bonobo-asg?access_key=XXXX&secret_key=XXXX+XXXXX\XXXXXX®ion=eu-west-3&auto_setup=false"
And my messenger.yml
config file :
framework:
messenger:
transports:
asg:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
serializer: App\Messenger\SnsSerializer
When i launch the consumer i get the following error :
[AsyncAws\Core\Exception\Http\ClientException (403)]
HTTP 403 returned for "https://sqs.eu-west-3.amazonaws.com/".
Code: SignatureDoesNotMatch
Message: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for de
tails.
I think it comes from the special chars in the secret key because when i try with another key containing only letters and numbers, it works fine.
I tried to escape the special chars with \
but it gives me the same error.
How can i use my key containing special chars with the symfony sqs consumer?