Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SDK size is not deployable in AWS Lambdas

See original GitHub issue


That’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: 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: image

UPDATE 2: Even chai and mocha are included in the dependencies…

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

andreujuanccommented, Jul 24, 2021

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.

andreujuanccommented, Feb 19, 2021

Thanks for your reply. We are thinking on building an AWS lambda docker image, since this approach allows for more storage. I think this should do. This can be closed. PS: You should work with library authors to reduce size, since this has a big performance impact regardless of the deployment issue.

Be sure to checkout localstack if you havent already. I’m in talks with them but the engineer I was able to talk to said its on their backlog, but they’re incredibly backed up. Hopefully within this quarter.

You probably meant 😄 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot deployment issues in Lambda
When you upload a deployment package or layer archive directly to Lambda, the size of the ZIP file is limited to 50 MB....
Read more >
Best practices for working with AWS Lambda functions
Minimize your deployment package size to its runtime necessities. This will reduce the amount of time that it takes for your deployment package...
Read more >
AWS Lambda – FAQs
Uploads must be no larger than 50MB (compressed). You can use the AWS Eclipse plugin to author and deploy Lambda functions in Java....
Read more >
Lambda quotas - AWS Documentation
Deployment package (.zip file archive) size. 50 MB (zipped, for direct upload). 250 MB (unzipped). This quota applies to all the files you...
Read more >
Lambda deployment packages - AWS Documentation
If your deployment package is larger than 50 MB, upload your function code and dependencies to an Amazon S3 bucket. You can create...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found