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.

Running individually packaged functions locally #223

@Kimahriman

Description

@Kimahriman

I have a Python function I'm individually packaging with requirements with a config like

plugins:
  - serverless-python-requirements
package:
  individually: true
functions:
  hello:
    handler: handler.lambda_handler
    module: func1

With a file structure like

serverless.yml
func1/
  __init__.py
  handler.py
  requirements.txt

I can deploy this function and it works fine, but when I try to invoke it locally, it fails. It looks like it doesn't do anything with the module, and just tries to run handler.lambda_handler instead of ./func1.handler.lambda_handler. If I change handler to func1.handler.lambda_handler, it runs locally, but obviously would fail when deployed.

Is there something I'm missing to make this work, or is this something that's possible to do with this plugin?

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