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

chore: statically import credential-provider-node in clients used from credentials #6027

Merged
merged 12 commits into from Apr 26, 2024

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Apr 25, 2024

Issue

Internal JS-5156

Description

Statically imports @aws-sdk/credential-provider-node in clients used from credentials, i.e. client-sts and client-sso-oidc

This import can be made static, since the credential providers are dynamically imported.

Testing

We benchmarked @aws-sdk/client-sts@v3.556.0 (latest version at the time of PR) getCallerIdentity operation for 100 counts before and after the change.

Before

╔════════════════════════════════════════════╤════════════════════╤═════════╤═════════╤════════╗
║                                            │ metric             │ p50     │ p90     │ stdDev ║
╟────────────────────────────────────────────┼────────────────────┼─────────┼─────────┼────────╢
║ [node 20.12.0, x86_64, 128 MB, us-west-1]: │ init_duration (ms) │ 321.72  │ 338.72  │ 23.71  ║
║ Code (esm) with sts get-caller-identity    │ request (ms)       │ 1183.14 │ 1233.86 │ 100.6  ║
║ v3.556.0 (2.15 MB)                         │                    │         │         │        ║
╚════════════════════════════════════════════╧════════════════════╧═════════╧═════════╧════════╝

After

╔════════════════════════════════════════════╤════════════════════╤════════╤═════════╤════════╗
║                                            │ metric             │ p50    │ p90     │ stdDev ║
╟────────────────────────────────────────────┼────────────────────┼────────┼─────────┼────────╢
║ [node 20.12.0, x86_64, 128 MB, us-west-1]: │ init_duration (ms) │ 319.6  │ 338.82  │ 22.12  ║
║ Code (esm) with sts get-caller-identity    │ request (ms)       │ 982.78 │ 1017.49 │ 90.68  ║
║ v3.556.0 (2.15 MB)                         │                    │        │         │        ║
╚════════════════════════════════════════════╧════════════════════╧════════╧═════════╧════════╝

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@trivikr trivikr changed the title chore(client-sts): statically import credential-provider-node chore: statically import credential-provider-node in clients used from credentials Apr 25, 2024
@trivikr trivikr force-pushed the sts-static-import-credential-provider-node branch 3 times, most recently from 8bf01be to 3dee0da Compare April 26, 2024 16:47
@trivikr trivikr marked this pull request as ready for review April 26, 2024 17:48
@trivikr trivikr requested a review from a team as a code owner April 26, 2024 17:48
@trivikr trivikr force-pushed the sts-static-import-credential-provider-node branch from 5b7b4a0 to 441151a Compare April 26, 2024 20:28
@trivikr trivikr merged commit 5ce5600 into aws:main Apr 26, 2024
5 checks passed
@trivikr trivikr deleted the sts-static-import-credential-provider-node branch April 26, 2024 22:55
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants