Skip to content

Layer: true not compatible with individually packaging & module separation #457

Open
@ribeirojose

Description

@ribeirojose

Bug Report

Description

  1. What did you do?
    Tried to deploy several functions in different modules.

  2. What happened?

  3. What should've happened?
    Package each function individually, creating a layer with each function's requirements.

  4. What's the content of your serverless.yml file?

service: name

provider:
  name: aws
  runtime: python3.8
  profile: default
  region: us-west-2

package:
  individually: true

exclude:
  - "**/*"

custom:
  pythonRequirements:
    useDownloadCache: true
    useStaticCache: true
    dockerizePip: non-linux
    noDeploy: []
    slim: true
    strip: false
    layer: true

functions:
  Function1:
    handler: index.handler
    module: functions/function1
    memorySize: 128
    timeout: 2

  Function2:
    handler: index.handler
    module: functions/function2
    memorySize: 128
    timeout: 2

  Function3:
    handler: index.handler
    module: functions/function3
    memorySize: 128
    timeout: 2

  Function4:
    handler: index.handler
    module: functions/function4
    memorySize: 128
    timeout: 2

plugins:
  - serverless-python-requirements
  - serverless-step-functions
  1. What's the output you get when you use the SLS_DEBUG=* environment variable (e.g. SLS_DEBUG=* serverless deploy)
...
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Excluding development dependencies...
Serverless: Excluding development dependencies...
Serverless: Excluding development dependencies...
Serverless: Packaging Python Requirements Lambda Layer...

  Error --------------------------------------------------

  Error: ENOENT: no such file or directory, scandir '.serverless/requirements'

     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com

  Your Environment Information ---------------------------
     Operating System:          darwin
     Node Version:              13.7.0
     Framework Version:         1.63.0
     Plugin Version:            3.3.0
     SDK Version:               2.3.0
     Components Core Version:   1.1.2
     Components CLI Version:    1.4.0

Similar or dependent issues:
#373, #408, #328

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions