Skip to content

Dependencies aren't included in the dist/*.zip file after a build #490

@monocongo

Description

@monocongo

Thanks for all the work that's been done on this tool and for sharing as open-source, it really looks promising.

I have run lambda build but it doesn't appear to add any of the dependencies for my Lambda function in the resulting dist/*.zip file. I have a requirements.txt in the project directory (as described here) but this doesn't appear to have any effect.

For example, in the Lambda function Python file containing the handler function, I import a single package/module abc.xyz that is implemented in a local source folder, and I will install from there instead of from PyPI or git repositories as for more typical, non-local dependencies. This module has dependencies of its own and uses psycopg2 to make a connection to PostgreSQL.

The requirements.txt:

certifi==2020.4.5.1
/home/james/git/abc
psycopg2-binary==2.8.5
six==1.14.0
SQLAlchemy==1.3.16
SQLAlchemy-Utils==0.36.3

My assumption was that python-lambda would use pip to somehow install all these dependency packages someplace and then add these into a /dist/*.zip that also includes the Lambda function Python file. Maybe there's something else required to trigger the addition of dependencies into the /dist/*.zip when running a build?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions