aws/aws-lambda-builders

Skip PythonPipBuilder:Validation if no requirements.txt exists

Opened this issue · 1 comments

Skip Validation on langauge when not building dependencies

When only using PythonPipBuilder:CopySource, the Python version installed on the machine should not matter.

requirements.txt file not found. Continuing the build without dependencies.
 Running PythonPipBuilder:CopySource

For situations where the dependencies are being packaged into a layer, it's unnecessary to have Python installed at all - or at least the python version could be relaxed so as not to require the same version the lambda is targeting:

Error: PythonPipBuilder:Validation - Binary validation failed for python, searched for python in following locations  : ['/usr/bin/python', '/bin/python', '/usr/bin/python3', '/bin/python3'] which did not satisfy constraints for runtime: python3.12. Do you have python for runtime: python3.12 on your PATH?

That suggestion makes a lot of sense to me. Thanks for the request, I'll bring it to the team for prioritization.