Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@aws-sdk/credential-providers 3.730.0 credentials is missing error #6816

Open
4 tasks done
samchungy opened this issue Jan 17, 2025 · 1 comment
Open
4 tasks done
Assignees
Labels
bug This issue is a bug. p1 This is a high priority issue potential-regression Marking this issue as a potential regression to be checked by team member

Comments

@samchungy
Copy link
Contributor

samchungy commented Jan 17, 2025

Checkboxes for prior research

Describe the bug

We ran into an error on Lambda when we bumped up our credential-providers package to 3.730.0.

err: {
     message: `credentials` is missing
     stack: Error: `credentials` is missing
    at credentialsProvider (/var/task/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js:211:15)
    at boundCredentialsProvider (/var/task/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js:215:71)
    at /var/task/node_modules/@smithy/core/dist-cjs/index.js:85:23
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /var/task/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js:33:22
    at async /var/task/node_modules/@aws-sdk/credential-providers/dist-cjs/fromTemporaryCredentials.js:50:33
    at async coalesceProvider (/var/task/node_modules/@smithy/core/dist-cjs/index.js:368:18)
    at async /var/task/node_modules/@smithy/core/dist-cjs/index.js:386:18
    at async /var/task/node_modules/@smithy/core/dist-cjs/index.js:85:17
    at async /var/task/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js:33:22
     type: Error
   }

I couldn't quite spot much in the diff: https://npmdiff.dev/%40aws-sdk%2Fcredential-providers/3.729.0/3.730.0/

Regression Issue

  • Select this option if this issue appears to be a regression.

SDK version number

@aws-sdk/[email protected]

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

Node 20.18.0, Node 22.

Reproduction Steps

https://github.com/samchungy/aws-credentials-provider-bug

Observed Behavior

fromTemporaryCredentials throws an error

Expected Behavior

It should not throw an error when using fromTemporaryCredentials

Possible Solution

No response

Additional Information/Context

No response

@samchungy samchungy added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 17, 2025
@github-actions github-actions bot added the potential-regression Marking this issue as a potential regression to be checked by team member label Jan 17, 2025
72636c added a commit to seek-oss/rynovate that referenced this issue Jan 17, 2025
Hopefully this helps with the obvious cases, though the dependency could
still be pulled in transitively.

aws/aws-sdk-js-v3#6816
72636c added a commit to seek-oss/rynovate that referenced this issue Jan 17, 2025
Hopefully this helps with the obvious cases, though the dependency could
still be pulled in transitively.

aws/aws-sdk-js-v3#6816
@kuhe kuhe self-assigned this Jan 17, 2025
@kuhe kuhe added p1 This is a high priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Jan 17, 2025
@kuhe
Copy link
Contributor

kuhe commented Jan 17, 2025

Thanks for submitting this report. I am investigating this issue.

As a workaround, please use 3.729.0, or provide credentials like this:

import { PublishCommand, SNSClient } from "@aws-sdk/client-sns";
import { fromTemporaryCredentials, fromNodeProviderChain } from "@aws-sdk/credential-providers";

const sns = new SNSClient({
  region: "ap-southeast-2",
  credentials: fromTemporaryCredentials({
    params: {
      RoleArn: "arn:aws:iam::000000000000:role/some-role",
      RoleSessionName: "some-session",
    },
    masterCredentials: fromNodeProviderChain()
  }),
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p1 This is a high priority issue potential-regression Marking this issue as a potential regression to be checked by team member
Projects
None yet
Development

No branches or pull requests

2 participants