lambci/git-lambda-layer

Unable to import module 'lambda_function': No module named 'git'

kaktusas2598 opened this issue · 1 comments

I followed steps to set up git layer using provided ARN with eu-west-1 region. I am doing "from git import Repo", but I do get following error then testing my lambda: "Unable to import module 'lambda_function': No module named 'git'". Any ideas how to solve this?

mhart commented

This layer provides the git binary – it doesn't provide any python modules or Node.js modules or similar.

You can use the subprocess module in Python to execute git. https://docs.python.org/3/library/subprocess.html