-
Notifications
You must be signed in to change notification settings - Fork 545
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
Credentials object returned from sts.assumeRole cannot be used as credentials for clients #3940
Comments
Hi @jonpbbc , Thanks for opening the issue and engaging in the community. I think the reason your first code snippet isn't working as expected is because Client credentials and the Credential object returned from STS are of different type.
I'd say the "work around" is the correct way to make that request. Did you reference an official example or docs for the first code snippet you have provided? All the best, |
Hi @RanVaknin , I was working from the documentation, specifically the IAM client config as part of calling the If My route to the work around was searching for the Hope that helps, Jon |
Hi Jon, Thanks for your response! I totally see what you are saying and it makes a lot of sense. I'll speak with the development team regarding this issue and will raise a backlog item. In the spirit of transparency I'll share that the team is slammed, and since this has a workaround it will get lower priority, but will get addressed later on. Thanks again for being an active member in the community, we hope to hear back from you! |
Greetings! We’re closing this issue because it has been open a long time and hasn’t been updated in a while and may not be getting the attention it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to comment or open a new issue. |
The behaviour has changed slightly, but use of a returned credentials object as an input credentials object to the next call still fails:
Script:
Script output:
|
Checkboxes for prior research
Describe the bug
If you use sts.assumeRole to get session credentials for an assumed role and then pass those credentials to a client the case mis-match means you recieve the
TypeError: Cannot read property 'byteLength' of undef
described in #2282This doesn't feel like a documentation error as in #3268, as I am trying to use SDK objects to populate SDK objects.
SDK version number
"@aws-sdk/client-iam": "^3.154.0", "@aws-sdk/client-sts": "^3.168.0"
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
Node 14 via aws/codebuild/standard:5.0
Reproduction Steps
Observed Behavior
TypeError: Cannot read property 'byteLength' of undefined
as per #2282Expected Behavior
I would expect to be able to use the returned Credentials object as the credentials for constructing a subsequent client object.
Possible Solution
No response
Additional Information/Context
Work-around to avoid error:
The text was updated successfully, but these errors were encountered: