-
Notifications
You must be signed in to change notification settings - Fork 611
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Regression in credential provider force refresh starting in 3.667, now affects lambda runners in us-east-1 #6960
Comments
The credentials provider function given to AWS SDK clients should not have parameters. Also, interacting with the I think our documentation is not clear enough about this, so we need to fix that. I will look into incorporating your PR's fix. It may be more complex than it appears, and will take significant time, both to merge it and then to get the change onto AWS Lambda. |
@kuhe My example shows the credential provider given to the SDK does not have parameters, you may be mis-understanding the issue here. The issue is that the memoized provider (auto-created by the SDK) accepts a parameter object when the provider is called, and the internal code made a mistake in dropping that parameter. I understand that today you prefer SDK users to not interact with client.config object directly, but it is part of the public API and the public documentation here shows no indication it is internal only, and its use broke due to a mistake while adding logging. The history of the I am not asking for an immediate upgrade of us-east-1 as we have worked around the issue by bundling an outdated SDK. But I am highlighting the severity of the issue and its potential to impact other customers as the SDK version is bumped in other regions (I see us-west-2 has an older version that is not impacted). As it is a breaking change to a public API, I'm requesting a higher priority in providing a fix. |
resolves aws#6960 edit: add types
I looked into the history of the interface and you're right that await client.config.credentials({
forceRefresh: true,
}); was a public API with signature Around v3.465-3.485, with the introduction of SRA ID & auth (you don't need to know what that is, it's for maintainer reference) the type was loosened excessively to /**
* @public
*/
export interface IdentityProvider<IdentityT extends Identity> {
(identityProperties?: Record<string, any>): Promise<IdentityT>;
} We intend to merge your fix. I am not able to give an ETA, but we will treat it as a high priority. |
PR #6961 was merged, and this fix will be published in https://github.com/aws/aws-sdk-js-v3/releases/tag/v3.774.0 around 12 noon Pacific today (Mon March 24th). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hi @RossWilliams - checking in with you to confirm the fix that was released in v3.774.0. Please let us know if anything before closing the issue. |
Checkboxes for prior research
Describe the bug
A change in 3.667, PR #6546 , accidentally changed behaviour of the credential provider. This change is now in the lambda runner in US-East-1, causing production issues for users not bundling the SDK, or for users that bundle version 3.667 or later.
This line invokes the customer-supplied credential provider, but does not pass through the credential arguments, causing any arguments supplied by the user to be dropped.
A fix for the issue is to pass through the parameters.
A specific parameter that gets dropped in my case is the
forceRefresh
parameter, which is used in a more complex scenario to provide tenant-scoped credentials.Regression Issue
SDK version number
@aws-sdk/core@3.667
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v22.13.0
Reproduction Steps
Minimal reproduction which passes in 3.666 and fails in 3.667 (and later)
package.json
Observed Behavior
Credentials fetched once
Expected Behavior
Credentials fetched twice
Possible Solution
Additional Information/Context
The PR that introduced this change was a chore PR to introduce logging, I believe the change was inadvertent.
The text was updated successfully, but these errors were encountered: