aws / aws-sdk-js-v3

Modularized AWS SDK for JavaScript.
Apache License 2.0
3.12k stars 579 forks source link

Missing support for Lex V2 #1975

Closed frsechet closed 3 years ago

frsechet commented 3 years ago

Is your feature request related to a problem? Please describe.

AWS SDK v2 supports Lex V2, would be nice if v3 had it as well.

Describe the solution you'd like

Same as Lex V1, but with the V2 APIs!

Describe alternatives you've considered

Additional context

We want to use Lex V2 with Lambda. The version of AWS SDK packaged on Lambda is too old and does not support Lex V2. The most recent versions of aws-sdk@2.x do support Lex V2, but they are too large to package effectively on Lambda. Having this version of the SDK support Lex V2 is actually our only way to support Lex V2 (beyond using the HTTP API directly which is not as comfortable).

trivikr commented 3 years ago

The most recent versions of aws-sdk@2.x do support Lex V2, but they are too large to package effectively on Lambda.

We're working on updating client models in AWS SDK for JavaScript v3.

In the mean time, please import individual service to reduce bundle size in AWS SDK for JavaScript v2 as follows:

const LexModelsV2 = require('aws-sdk/clients/lexmodelsv2');
const LexRuntimeV2 = require('aws-sdk/clients/lexruntimev2');

More info on bundle size reduction with individual service imports in v2: https://github.com/aws-samples/aws-sdk-js-v3-workshop/tree/main/packages/backend#reduce-bundle-size-by-just-importing-dynamodb

frsechet commented 3 years ago

Yes, I'm aware of that, however it's not very practical in my situation as I'm using also many other APIs from the v2 SDK and I also need the full aws-sdk for those places. My idea was to keep using the global aws-sdk from lambda + just the lexV2 apis from SDK v3 for minimal code change. Depending on the ETA for the LexV2 apis in SDK v3, it might be worth it for me to spend the time on a workaround or not!

trivikr commented 3 years ago

The client-lex-models-v2 is being added in new model update in https://github.com/aws/aws-sdk-js-v3/pull/2258

github-actions[bot] commented 3 years ago

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.