title: Nestjs credential issue with Amazon SQS queue
body: <p>I am trying to publish a message from my nestjs application to an amazon sqs queue.</p>
  <p>Here is a snippet of a simple post request, and i am using the package from aws-sdk:</p>
  <pre><code>import * as aws from 'aws-sdk';
  
  --
  --
  --
  --
  --
  
  @Post('dummySqs')
    async sendMessage(@Body() message: string) {
      const config = {
        apiVersion: '2022-02-21',
        accessKeyId: 'myaccess',
        accessSecretKey: 'mysecret',
        region: 'us-east-1',
        output: 'json',
      };
      aws.config.update(config);
      const sqs = new aws.SQS();
      const params = {
        MessageBody: 'Something about Daniel',
        QueueUrl: 'myurl',
      };
      sqs.sendMessage(params, (err, data) =&gt; {
        if (err) {
          console.log('ERRROR', err);
        } else {
          console.log('Success', data.MessageId);
        }
      });
    }
  
  </code></pre>
  <p>After hitting this post request, i am getting the error below:</p>
  <pre><code>ERRROR Error [CredentialsError]: Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1
      at Timeout.connectTimeout [as _onTimeout] (/Users/danielongzh/Documents/poc/schedule-distributed-lock-service/node_modules/aws-sdk/lib/http/node.js:69:15)
      at listOnTimeout (internal/timers.js:555:17)
      at processTimers (internal/timers.js:498:7) {
    code: 'CredentialsError',
    time: 2022-02-21T13:31:40.708Z,
    retryable: true,
    originalError: {
      message: 'Could not load credentials from any providers',
      code: 'CredentialsError',
      time: 2022-02-21T13:31:40.707Z,
      retryable: true,
      originalError: {
        message: 'EC2 Metadata roleName request returned error',
        code: 'TimeoutError',
        time: 2022-02-21T13:31:40.707Z,
        retryable: true,
        originalError: [Object]
      }
    }
  }
  </code></pre>
  <p>Any ideas on how to solve it?</p>