bbc / sqs-consumer

Build Amazon Simple Queue Service (SQS) based applications without the boilerplate
https://bbc.github.io/sqs-consumer/
Other
1.71k stars 330 forks source link

[Bug]: SQS receive message failed: Could not load credentials from any providers #428

Closed KozielGPC closed 8 months ago

KozielGPC commented 9 months ago

Describe the bug

I'm trying to setup a sqs consumer in nestjs using the package @ssut/nestjs-sqs but I'm having some troubles. When I start my application I get the error below:

image

My setup:

"dependencies": {
    "@apollo/server": "^4.9.3",
    "@graphql-tools/utils": "^10.0.6",
    "@nestjs/apollo": "^12.0.9",
    "@nestjs/common": "^10.2.6",
    "@nestjs/config": "^3.1.1",
    "@nestjs/core": "^10.2.6",
    "@nestjs/graphql": "^12.0.9",
    "@nestjs/platform-express": "^8.0.0",
    "@prisma/client": "^5.3.1",
    "@ssut/nestjs-sqs": "^2.2.0",
    "aws-sdk": "^2.1473.0",
    "class-transformer": "^0.5.1",
    "class-validator": "^0.14.0",
    "graphql": "^16.8.1",
    "graphql-tools": "^9.0.0",
    "prisma": "^5.3.1",
    "reflect-metadata": "^0.1.13",
    "rimraf": "^3.0.2",
    "rxjs": "^7.2.0"
  },

Your minimal, reproducible example

https://github.com/KozielGPC/rls-prisma-postgres-example/tree/add-aws-sqs

Steps to reproduce

  1. Set your .env file following the .env.example
  2. Install dependencies
  3. Run the application

Expected behavior

It is expected to connect to the SQS queue and receive messages without any problems

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

Package version

^2.2.0

AWS SDK version

^2.1473.0

Additional context

No response

nicholasgriffintn commented 9 months ago

Hey, sorry, these type of errors are hard to identify, but generally, they are either issues with configuration or the credentials provided.

This error is also coming from the AWS SDK directly and just forwarded on by SQS Consumer, it isn't actually an error from this library. We'd need more details on it and where the issue is with this library to be able to support with an issue, otherwise, this is probably better placed as a discussion.

We can't support issues with the AWS services.

github-actions[bot] commented 7 months ago

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.