Skip to content
This repository was archived by the owner on Jul 16, 2024. It is now read-only.
This repository was archived by the owner on Jul 16, 2024. It is now read-only.

Help on internal dependencies packaging #66

@BeliBengaay

Description

@BeliBengaay

Feature request
Our team recently started using lambdas and we have been using lambda packager plug-in to easily resolve external dependencies and package. It works agreat.
After creating few lambdas, we realized that we are repeating some utility methods in each lambda trying to establish a shared 'utils' folder to avoid duplication of some common methods

Provided below is the proposed project structure for python code related to lambda. The 'utils' folder has my commonly used methods by different lambdas.
This might be what other teams trying to stick to DRY principle might be doing. so guessing this structure is not unique to our project.

ProjRoot\src
├── MyFirstLambdaHandler
└── index.py
├── MySecondLambdaHandler
└── index.py
├── MyThirdLambdaHandler
└── index.py
└── utils
└── common.py
└── shared.py

Before establishing the 'utils' folder when the packaging is done, had set LAMBDA_CODE_DIR: src/MySecondLambdaHandler to get the handler and it works fine.
After 'utils' folder is created, is it possible to package just 'MySecondLambdaHandler' and 'utils' without packaging all folders under source for each lambda.

Looked at documentation pages below but still not sure how to achieve it. Hence making a feature request.
https://github.mmm.com/MMM/aws-bootcamp/blob/master/noble/lambda-packager.md
https://github.com/3mcloud/lambda-packager/blob/master/docs/guides/user/python_packager.rst

For external dependencies, we use requirements.txt and use the REQUIREMENTS_FILE environment variable
So viewing 'Utils' folder as internal dependency, can we have something env variable say LAMBDA_CODE_DEPENDENCIES_DIR so that we can package intended lambda folder and dependency folder?

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