Serverless-webpack: "individually" flag in function definition is ignored

Created on 15 Nov 2018  路  5Comments  路  Source: serverless-heaven/serverless-webpack

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"
question

Most helpful comment

@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

All 5 comments

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jmparsons picture jmparsons  路  5Comments

vladtamas picture vladtamas  路  5Comments

jaydp17 picture jaydp17  路  4Comments

jonni-larjomaa picture jonni-larjomaa  路  3Comments

bitttttten picture bitttttten  路  4Comments