nestjs-sqs icon indicating copy to clipboard operation
nestjs-sqs copied to clipboard

Add support for useQueueUrlAsEndpoint for emulated sqs development

Open kazazor opened this issue 10 months ago • 2 comments

Similar to what was done on sqs-consumer in version 9.1.0: https://github.com/bbc/sqs-consumer/pull/472, it's needed here.

An example is using LocalStack for local development, and with the new upgrade to use aws-sdk v3 you'll get a constant warning like this:

QueueUrl=http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/S3AssetsNotificationQueue-development differs from SQSClient resolved endpoint=https://sqs.us-east-1.amazonaws.com/, using QueueUrl host as endpoint.
Set [endpoint=string] or [useQueueUrlAsEndpoint=false] on the SQSClient.

kazazor avatar Apr 15 '24 09:04 kazazor

Hello, I met the same issue. Add AWS_REGION to your env file

I hope it's resolved.

AWS_REGION='ap-northeast-2' # your region

yujiniii avatar Apr 25 '24 08:04 yujiniii

Thanks @yujiniii , in our case that won't help as we need the AWS to be set to a different value

Thanks for the help!

kazazor avatar Apr 25 '24 11:04 kazazor

This issue is not relevant anymore and the sqs-consumer package was updated and this option is now available:

useQueueUrlAsEndpoint: true,

kazazor avatar Aug 21 '24 06:08 kazazor