Skip to content

How to speed up packaging with multiple lambda functions and package individually set to True? #183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
skeller88 opened this issue Apr 29, 2018 · 5 comments

Comments

@skeller88
Copy link

This library has been helpful, but I'm running into performance limits. At 5 lambda functions with per package requirements and the dockerizePip option, the package step is taking 5 minutes. With "package individually" set to "True", that step takes 1.5 minutes. That's great, but I need the individual packaging to stay under the lambda deployment package size limit. How can I speed up the package step?

Creating a docker image with all of the dependencies would probably help. I'm going to try that.

Is there a way to just package a single lambda function? It doesn't seem like there is. Is there a way to parallelize the packaging of lambda functions? Also doesn't seem like there is.

@dschep
Copy link
Contributor

dschep commented Apr 30, 2018

Yeah I'm not sure what to do about that. Your right AFAIK that there's only "full service" sls package and that packaging of the functions not being parallel is probably how sls does it 😕

@skeller88
Copy link
Author

Right. How has the lambda process scaled for you guys then? I would assume you have dozens of lambdas or more at this point.

One way to get around the Serverless packaging slowness could be to have several build processes, each of which does a different subset of the lambdas.

@dschep
Copy link
Contributor

dschep commented Apr 30, 2018

We don't use package: individually, so we're just building 1 package (and have relatively few dependencies)

@skeller88
Copy link
Author

Gotcha. Well I'd be fine with this issue being closed then. Sounds like a feature request for the Serverless Framework :).

@dschep
Copy link
Contributor

dschep commented Apr 30, 2018

Yeah. There are some very promising speed improvements in progress in #165 you probably want to keep an eye on 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants