-
Notifications
You must be signed in to change notification settings - Fork 30
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
Upgrade to aws-sdk v3 #508
Comments
Great suggestion! There might be a possibility of a breaking change depending on what's being updated. Let's watch closely we need to bump to v2. |
Node 18 runtime uses only v3 of the sdk. https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html |
@reestolonio Thanks for bringing this up! Are you stuck because of the version at the moment? I'll be away for 1-2 weeks, we'll appreciate pull requests as well if you can manage it! |
@Ankcorn Suggested the usage of https://aws-lite.org/ as an alternative to upgrading AWS SDK. cc: @mpxr @tschoffelen |
AWS-SDKv2 Issue I was checking the EOL issue, the problem isn't that v2 will not work anymore, only that will not be shipped with runtime anymore. Context: Now, Node 18+ runtimes will come with AWS SDKv3. I didn't test it, but means we could still use v2 until it's EOL, V2 has no EOL defined yet, but users cannot take advantage of this provided trick. That doesn't mean we don't have to be prepared to EOL or upgrade, only that maybe this EOL issue is less urgent than we think. AWS-SDKv3 vs AWS-lite I'm glad to know about AWS-lite, but I don't think (I have no data) that SDK3 is worse than SDK2, in my tests SDKv3 wasn't worth the upgrade effort (no reduced bundle size). But if the problem is that users will not take advantage of the provided trick, it would be the same for AWS-lite. We have the following installation scenarios:
And we should measure the following properties at least:
We also have to check other pros and cons:
|
Thanks, Hugo.
EOL is not directly for the SDK, but its relationship with AWS Lambda. The EOL is defined here, starting Aug 15, 2024, all Lambdas must be deployed with node18, which no longer ships with AWS-SDKv2. I agree that the v3 vs lite needs a broader assessment. |
I briefly looked at aws-lite performance metrics. It's unclear to me, but it seems that the limitation of the assessment is it doesn't compare against "AWS-SDKv3 Provided" scenario i.e. code deployed doesn't include aws-sdk (it's unclear to me what the graph means) In my head, "AWS-SDKv3 Provided" will provide the best performance, so it could influence people's lack of adoption of aws-lite. |
They call it "Raw", but Provided ("Raw") should not differ from Bundled in run speed (ignoring cold starts), unless they did it in a suboptimal way. IE. they import AWS-SDK for every request. |
After that, I'm not sure if they did the benchmark correctly, but as I can see:
¹ high market share of sdk2 means most users would use sdk2 bundled, have sdk3 provided and if we use, also lite bundled
Unless AWS-SDKv2 stopped working in Node 18+ or we cannot have the provided aws-sdk3 (not in use) and bundled aws-sdk2 (in use), that relationship only matters for provided, not for bundled. If the last statement is true (it is??), there is a palliative option til we migrate to sdk3 or adopt lite: Have two sdk versions. Isn't good, but less catastrophic than say it won't work after Aug 15, 2024. |
Wow, thanks for doing all the analysis, Hugo!
If users are using sdk2 bundled, they will not be importing sdk3. This means there's no performance impact of AWS providing sdk3.
I have just confirmed with Brian that Raw means provided by the Lambda runtime.
I just got this revelation too that this is not necessarily true. Think about why we bundle js files for browser libraries i.e. there could be a good amount of useless code that's involved in the I/O when things are raw.
Yes! This is a valid option. Companies who want to still deploy via Node18+SDKV2 can bundle in SDKv2 on their own. AWS Lambda Layer is also an option. Scenarios:
I'm beginning to think that aws-lite should be considered differently for Laconia.js i.e. we support it if there are a good enough requests to support it, because:
|
That because I'm not correctly using the term "bundle". I'm using it as user provided (SDK in the user package), the opposite of aws provided (referred only as provided because of Maven analogy).
Most people refer to "bundle" as "compiled".
Maybe because of speed difference between network I/O and disk I/O, 1 has more impact in cold starts than 2.
I'm expecting that by actual market share of v2, how powerful are demons from dependency hell and how accurate is Murphy, user import both. I just don't know if it will work.
|
Is your feature request related to a problem? Please describe.
Some day aws will release a new version of aws-sdk (aws-sdk v3).
Describe the solution you'd like [optional]
We should be prepared or at least plan the migration.
Additional context
New version features modularized packages it could reduce cold start
The text was updated successfully, but these errors were encountered: