-
Notifications
You must be signed in to change notification settings - Fork 626
Closed
Labels
bugThis issue is a bug.This issue is a bug.p2This is a standard priority issueThis is a standard priority issue
Description
Checkboxes for prior research
- I've gone through Developer Guide and API reference
- I've checked AWS Forums and StackOverflow.
- I've searched for previous similar issues and didn't find any solution.
Describe the bug
When using AWS js sdk with white space in sso_session, it will fail and throws Cannot read properties of undefined (reading 'sso_region')
exception.
Regression Issue
- Select this option if this issue appears to be a regression.
SDK version number
@aws-sdk/credential-providers
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
node v22.14.0
Reproduction Steps
AWS Config file:
[profile user-xxx]
sso_session = test sso
...
[sso-session 'test sso']
...
Using this SSO credential file in JS SDK will throws Cannot read properties of undefined (reading 'sso_region')
exception
const credentials = fromSSO({
profile: "user-xxx",
});
const stsClient = new STSClient({
region: "ap-southeast-2",
credentials,
});
const response = await stsClient.send(new GetCallerIdentityCommand({}));
But this config is working well with AWS CLI
Observed Behavior
It should be worked like AWS CLI
Expected Behavior
Using this SSO credential file in JS SDK will throws Cannot read properties of undefined (reading 'sso_region')
exception
Possible Solution
No response
Additional Information/Context
No response
Eug92100
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.p2This is a standard priority issueThis is a standard priority issue