fix: role assumption through profiles not working properly in certain situations #14315
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
This PR fixes 2 bugs that affect people who get their credentials from profiles that look like this:
@aws-sdk/credential-providers@aws-sdk/credential-providersuses v4 of@smithy/property-providers. This is a problem because our bundling solution (pkg) does not support dynamic imports, which were introduced in v4 of@smithy/property-providers. So I downgraded us to the newest version that still uses v3 of@smithy/property-providersuntil we come up with a more permanent solution.Not sure why this change specifically broke profiles that use a role and another profile to get credentials since profiles that got credentials through other methods worked fine for me.
identity.expiration.getTime is not a functionThe expiration field within credentials of profiles that get credentials through a role and another profile is a string instead of a Date. This was fine in AWS SDK V2, since it was more flexible with types, however AWS SDK V3 is much stricter with typing so the expiration field needs to get converted to a Date before it gets used in any clients.
Issue #, if available
#14290
Description of how you validated changes
Discovered the first issue after 14.2.1 was released and was able to reproduce the second issue and verify that both are fixed by these changes.
Checklist
yarn testpassesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.