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

v3 Javascript SDK compatibility? #697

Open
paul-uz opened this issue Oct 26, 2021 · 6 comments · May be fixed by #699
Open

v3 Javascript SDK compatibility? #697

paul-uz opened this issue Oct 26, 2021 · 6 comments · May be fixed by #699
Labels
dependencies Pull requests that update a dependency file Triage

Comments

@paul-uz
Copy link

paul-uz commented Oct 26, 2021

When will this SDK be updated to work with the v3 JS SDK?

@talkingnews
Copy link

See also #696 - same thing, opened 22 days ago but no comments...

@sjcomstock67
Copy link

Thanks for the feedback @paul-uz and @talkingnews. This is something we definitely want to pick up. Prioritization has been challenging given competing priorities. But we'll take a look

@rahulawl
Copy link
Contributor

Is this issue/feature-request still relevant?
We are working on prioritization of relevant issues and cleanup of rest. If we don’t hear back in 2 weeks, we will assume that the issue is not relevant and we will close it.

@paul-uz
Copy link
Author

paul-uz commented Sep 12, 2022

Yes of course its still relevant. Why wouldn't it be?

@seanfisher
Copy link

@rahulawl It is still relevant and more needed than ever now that Node.js 18.x is out. From this AWS blog post:

In v3, the modular packages reduce the bundle size of your application by ~75% when compared to v2, which helps improve application performance. The middleware stack allows you to easily customize SDK behavior, where you can add your custom asynchronous actions and/or remove default ones. The v3 has first-class TypeScript support, which saves you time catching errors and providing fixes before you run your code.

Additionally, from this AWS blog post on the Node.js 18.x runtime:

Up until Node.js 16, Lambda’s Node.js runtimes have included the AWS SDK for JavaScript version 2. This has since been superseded by the AWS SDK for JavaScript version 3, which was released in December 2020. With this release, Lambda has upgraded the version of the AWS SDK for JavaScript included with the runtime from v2 to v3.

If your existing Lambda functions are using the included SDK v2, then you must update your function code to use the SDK v3 when upgrading to the Node.js 18 runtime. This is the recommended approach when upgrading existing functions to Node.js 18. Alternatively, you can use the Node.js 18 runtime without updating your existing code if you deploy the SDK v2 together with your function code.

Version 3 of the SDK for JavaScript offers many benefits over version 2. Most importantly, it is modular, so your code only loads the modules it needs. Modularity also reduces your function size if you choose to deploy the SDK with your function code rather than using the version built into the Lambda runtime. Learn more about optimizing Node.js dependencies in Lambda here.

Because ask-sdk does not use v3 of the AWS SDK, developers have to bundle the large v2 SDK code with their application - just for this library. When you're trying to reduce request latency from cold starts to service Alexa skills, this matters. Looks like this is also discussed in #696.

@talkingnews
Copy link

It's now almost 2 years since this issue was opened - it looks like this library is abandonded so we're going to have to work with what we've got.

Fortunately, there now appears to be a way of stopping all the warnings clogging up your logs...

aws/aws-sdk-js#4354

Either use env var AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE=1
or
require('aws-sdk/lib/maintenance_mode_message').suppress = true;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file Triage
Projects
None yet
6 participants