Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Scoping of module prevents include/exclude of top level folders #502

@Jwan622

Description

@Jwan622

So in a serverless file, I'm trying to install requirements for different lambdas so I'm using serverless-python-requirements and the module and fileName parameters. However I'm also trying to use package include and exclude for files and folders at the same level as the serverless file and not the filepath that the module scopes into. What I notice is that module is limiting the scope to the lambda folder so that top-level shared folders are no longer visible to the serverless file for includes and excludes. How can I install requirements for each lambda while also not limiting the scope of folders and files that I can include into each individual lambda?

In short, say I have files .serverless, and folders lambda1, lambda2, shared_folder all on the same level. The module for each lambda function is lambda1 or lambda2 and then I have fileName: requirements/prod.txt to point to each lambda's requirements.txt file inside each respective folder and that prevents me from a line like include:shared_folder from working because of the scoping of the module keyword. Any solutions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions