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(credential-provider-node): statically import credential-provider-env #6026

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Apr 25, 2024

Issue

Internal JS-5156

Description

Statically imports @aws-sdk/credential-provider-node so that no additional time is spent on Lambda for dynamically importing the provider during request time.

Testing

The unit tests and integration tests are successful.

We benchmarked @aws-sdk/client-dynamodb@v3.556.0 (latest version at the time of PR) listTables operation for 100 counts before and after the change. In this sample benchmark, the request time at p50 is reduced by ~40ms or 4.3% with no change in init_duration.

Before

╔════════════════════════════════════════════╤════════════════════╤════════╤════════╤════════╗
║                                            │ metric             │ p50    │ p90    │ stdDev ║
╟────────────────────────────────────────────┼────────────────────┼────────┼────────┼────────╢
║ [node 20.12.0, x86_64, 128 MB, us-west-1]: │ init_duration (ms) │ 347.35 │ 369.93 │ 23.05  ║
║ Code (esm) with dynamodb list-tables       │ request (ms)       │ 932.98 │ 959.92 │ 64.98  ║
║ v3.556.0 (2.79 MB)                         │                    │        │        │        ║
╚════════════════════════════════════════════╧════════════════════╧════════╧════════╧════════╝

After

╔════════════════════════════════════════════╤════════════════════╤════════╤════════╤════════╗
║                                            │ metric             │ p50    │ p90    │ stdDev ║
╟────────────────────────────────────────────┼────────────────────┼────────┼────────┼────────╢
║ [node 20.12.0, x86_64, 128 MB, us-west-1]: │ init_duration (ms) │ 346.51 │ 371.8  │ 27.3   ║
║ Code (esm) with dynamodb list-tables       │ request (ms)       │ 894.77 │ 935.18 │ 93.3   ║
║ v3.556.0 (2.79 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(credential-provider-node): statically import credential-provider-node chore(credential-provider-node): statically import credential-provider-env Apr 25, 2024
@trivikr trivikr marked this pull request as ready for review April 25, 2024 17:07
@trivikr trivikr requested a review from a team as a code owner April 25, 2024 17:07
@trivikr trivikr merged commit c7872e2 into aws:main Apr 25, 2024
5 checks passed
@trivikr trivikr deleted the static-import-credential-provider-env branch April 25, 2024 17:14
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 10, 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