-
Notifications
You must be signed in to change notification settings - Fork 34
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
[FEAT] Build functions individually #81
Comments
Hi, i did make a With that set to each deploy configuration we might be able to achieve the smaller size effect. Do you have any insights? the function
|
I'd need to experiment with that a bit, it's an interesting thought. We had used the I've been elbow deep trying to triage some really esoteric build failures in our project for the last few days and will probably file a bug report after getting it working with my fork. I want to submit a PR, but with all the changes from the hotfix/0.5.3 branch other things are breaking in completely different ways, probably related to config schema changes. |
@tstackhouse Lets move this onto 1.0.0-beta i think its an easier code approach and easy to read as well. Sorry i am shuffling it around ... had to refactor to support the new workspace. If you do not want to update your workspace, maybe we can do a 0.5.4 fix for the solution? I can help you through it. |
No worries. I may have gotten a bandaid on my issue for the moment, I'd need to upgrade to serverless 2 in order to use the beta, as I get an error when attempting to run the deploy command:
It's still on my radar and want to keep the discussion going, but I may have at least gotten the immediate fire out by increasing my memory limit to the GH actions max. |
Any update on when this issue might be resolved? |
Hi, i will eye this on our next release. thanks for the bump @warrickhill |
Good afternoon guys, @tstackhouse how are you? |
@dornellas13 this is fixed in the current version. let me know if you get stuck anywhere, there is a bug for |
@dornellas13 we have released |
Describe the solution you'd like
Serverless supports the
package.individually
flag, however during the build step, all functions are passed through webpack together, resulting in a single dist build that the packaging step then pulls from. Without adding separate include/exclude rules to each function, this results in deployment artifacts that are identical (and can cause memory exhaustion in the packaging step as each artifact is built in complete parallel). Adding a global exclude and including individual function handlers to each artifact helps with this, however the generated node_modules includes deps for all the functions, not just the one that is pulled in.Describe alternatives you've considered
package.individually
results in each lambda having the same artifact deployedinclude
declarations will pull only the compiled handler, butnode_modules
is still identicalCheck which provider is affected:
[X] AWS
[?] Azure
[?] Google Cloud Platform
Check which framework is affected:
[] Angular
[x] Nodejs
[x] Serverless
[] Lambda
[] Infrastructure as a code
Additional context
I'm working on a project that we're using nx-serverless in production, and currently have ~60 lambda handlers in our API.
The text was updated successfully, but these errors were encountered: