alexa-skills-kit-sdk-for-nodejs icon indicating copy to clipboard operation
alexa-skills-kit-sdk-for-nodejs copied to clipboard

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

Open talkingnews opened this issue 3 years ago • 7 comments

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!

talkingnews avatar Oct 04 '21 06:10 talkingnews

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

sjcomstock67 avatar Oct 26 '21 16:10 sjcomstock67

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.

sam-goodwin avatar Oct 27 '21 00:10 sam-goodwin

@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.

sjcomstock67 avatar Dec 10 '21 16:12 sjcomstock67

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.

rahulawl avatar Sep 12 '22 10:09 rahulawl

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

seanfisher avatar Jan 11 '23 04:01 seanfisher

@rahulawl Yes, still relevant.

crackmac avatar Mar 01 '24 05:03 crackmac