Closed jyustman closed 1 year ago
Any update on this? Looking forward to getting it merged soon.
@ssut +1
I will merge this soon.
@ssut how about this PR? Looking forward to getting it merged soon.
Any update ? Something blocking ?
I will merge this soon.
I don't want to be pushy, but what's blocking you from merging @ssut ? I kind of rely on this before being able to deploy on prod 🙏
I apologize for the delay. I have manually merged this PR (https://github.com/ssut/nestjs-sqs/commit/4cc940e4daa90933f228a4cbdfba28c0b31c7671) as I had to change some more tiny things and wanted to check if this changes won't affect the tests. I am going to release v2.0.0 as soon as possible!
I just published v2.0.0: https://github.com/ssut/nestjs-sqs/releases/tag/v2.0.0 (npm: https://www.npmjs.com/package/@ssut/nestjs-sqs/v/2.0.0).
@ssut thanks for the new release.
I don't understand how you setup the AWS credentials though.
I read on the AWS doc SDK v3 (and on bbb/sqs-producer) that you should just provide a AWS_ACCESS_KEY_ID
and a AWS_SECRET_ACCESS_KEY
as .env
variables.
Nevertheless it's not working anymore for me 😢 now with this new release.
const sqsError = new SQSError(message);
^
SQSError: SQS receive message failed: The specified queue does not exist for this wsdl version.
at toSQSError (/node_modules/sqs-consumer/dist/errors.js:40:22)
at Consumer.receiveMessage (/node_modules/sqs-consumer/dist/consumer.js:159:43)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
@Sohett , are you using AWS CLI on your computer? If so, can you try renaming your ~/.aws directory to ~/.aws-temp and see if the problem persists? I was just seeing a similar error and this is what I did to solve it.
Here's the error I was getting:
SQSError: SQS receive message failed: Access to the resource https://sqs.us-east-2.amazonaws.com/ is denied.
at toSQSError (/my-path-to/node_modules/sqs-consumer/dist/consumer.js:48:22)
at Consumer.receiveMessage (/my-path-to/node_modules/sqs-consumer/dist/consumer.js:162:19)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
I noticed this by adding a console.log(this.sqs) to /my-path-to/node_modules/sqs-consumer/dist/consumer.js:162:19 and noticing that the accessKeyId property was being picked from my ~/.aws/credentials file.
I just started figuring out this so I'd appreciate it if anybody else could confirm.
@Sohett , are you using AWS CLI on your computer? If so, can you try renaming your ~/.aws directory to ~/.aws-temp and see if the problem persists? I was just seeing a similar error and this is what I did to solve it.
Here's the error I was getting:
SQSError: SQS receive message failed: Access to the resource https://sqs.us-east-2.amazonaws.com/ is denied. at toSQSError (/my-path-to/node_modules/sqs-consumer/dist/consumer.js:48:22) at Consumer.receiveMessage (/my-path-to/node_modules/sqs-consumer/dist/consumer.js:162:19) at processTicksAndRejections (node:internal/process/task_queues:96:5)
I noticed this by adding a console.log(this.sqs) to /my-path-to/node_modules/sqs-consumer/dist/consumer.js:162:19 and noticing that the accessKeyId property was being picked from my ~/.aws/credentials file.
I just started figuring out this so I'd appreciate it if anybody else could confirm.
I am indeed using the AWS CLI
, but this is not the root cause.
I just tested your proposed solution and it did not solve it.
Though you helped me solve it! By doing the same as you (console.log in the sqs-consumer
node package), I noticed the region was set to eu-west-1
, which is the one by default!
🤦 I was not passing the AWS_REGION
in my credentials !
Working like a charm now.
Hi, this seems to be working. Needs a little attention on package.json and package-lock.json, but hopefully this gets you close enough to wrap it up.