alexa / alexa-skills-kit-sdk-for-nodejs

The Alexa Skills Kit SDK for Node.js helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.
Apache License 2.0
3.12k stars 736 forks source link

Request: Migrate DynamoDbPersistenceAdapter to AWS SDK v3 and save 60Mb #696

Open talkingnews opened 3 years ago

talkingnews commented 3 years ago

Currently, DynamoDbPersistenceAdapter has a peer dependency of aws-sdk, which install 65Mb of stuff we don't need.

Whereas the current slimline v3 version of @aws-sdk/client-dynamodb is 4.97 Mb including dependencies. https://www.npmjs.com/package/@aws-sdk/client-dynamodb

Is anyone working on a re-write, as this library is currently the difference between my skill package being 7Mb or 70Mb!

sjcomstock67 commented 2 years ago

agree this is a pain point. Will try to bump it up on the priority list.

sam-goodwin commented 2 years ago

We definitely want to get to this. @talkingnews just so I understand, are you using any type of bundling/tree-shaking like webpack or esbuild for your skill? This might be especially helpful if you are running in AWS Lambda since the SDKs are provided by the container - bundle the skill and mark aws-sdk as external - the bundler will not include any AWS SDK code in your bundle, leaving you with a tiny JS file you can run in your Lamdba.

I understand this might not always be the right solution, so we should still create a new version of the adapter which doesn't depend on the whole AWS SDK.

sjcomstock67 commented 2 years ago

@doiron this was started by @sam-goodwin and there's a linked PR. We just need to finish it up. Will discuss during sprint planning.

rahulawl commented 2 years ago

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.

seanfisher commented 1 year ago

@rahulawl Yes, still relevant. See my comments in #697.

crackmac commented 7 months ago

@rahulawl Yes, still relevant.