serverless-webpack
serverless-webpack copied to clipboard
"individually" flag in function definition is ignored
This is a Bug Report
Description
Using individually: true
in function definition is ignored.
According to serverless docs, you can add individually
flag on per-function basis.
functions:
myFunction:
handler: myFunction.handler
package:
individually: true
Unfortunately, this flag is ignored by this plugin. I will happily create a PR but your guidance could really help.
Additional Data
- Serverless-Webpack Version you're using: 5.2.0
- Serverless Framework Version you're using: 1.32.0"
@HyperBrain is this currently possible at all? I was under the impression you could either have all your functions packaged into one ZIP, or each function separately packaged, but not a mixture of both?
@hassankhan @deftomat Yes, that's right. The plugin checks the global package setting and either packages all functions separately or as one service zip. In general, there should not be any need to create a mixed output.
Thanks for confirming that, @HyperBrain 👍.
@deftomat is there a use-case you had in mind?
@hassankhan
I have a use-case.
There's a log forwarding lambda, which I'd like to have deployed alongside each of my services.
I'd like that to be included in each of the services so I may pass custom metadata to that log forwarding lambda configuration in each service.
This lambda isn't my package, but a dependency and is written in Python.
As such, I'd like this lambda alone to be packaged separately.
logzio:
package:
individually: true
runtime: python3.6
handler: functions/logzio.lambda_handler
logForwarding:
enabled: false
Missing this feature as well. My AWS cognito trigger functions are small and need to be quick. Rest of functions share same large dependencies and should be in one package.