SDK size is not deployable in AWS Lambdas
See original GitHub issueThat’s the top 20 dependencies of this library. This was done on a clean folder and just: npm i bitgo
I would like to know if it’s possible to reduce the amount of unnecessary dependencies that are not explicit in the sdk’s package.json. For example:
And I’m not even counting the amount of SDKs of other blockchains that I’m not using.
I guess that someone started to include sdks without even checking for this stuff.
I noticed this issue: https://github.com/BitGo/BitGoJS/issues/302 by @jaydenseric and it looks like no body cared and it just got worse over time.
I’m physically constrained by this SDK, and I cannot use our current set of tools and architecture that we’ve been using for months now.
UPDATE: I just confirmed that the celo sdk (@celo/contractkit) is one of the biggest problems here:
UPDATE 2: Even chai and mocha are included in the dependencies…
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:11 (3 by maintainers)
Top GitHub Comments
Hi @Commoddity
We just lifted a fargate docker container with the express server image, then just http to it. It has been working perfectly since then. The only issue is that we are not 100% serverless anymore 😦 But hey now we’ve got some web3 listeners and started a couple of containers for that. In these cases we keep almost no logic and use them only as a “translation layer” between server instance and serverless using any kind of messaging system, in our case sns.
You probably meant localstack.cloud 😄 We already use it to do some integration testing. 😃 BTW just for the record, our easiest route was to spin up the express server (docker container) to act as a proxy so the lambdas can be very light without the sdk. We developed a very handy JS client for it.