python-lambda
python-lambda copied to clipboard
Too many packages included on `lambda deploy`
When I do lambda deploy it does include these packages:
boto3 (1.4.4) botocore (1.5.62) click (6.6) docutils (0.12) futures (3.0.5) jmespath (0.9.0) pip (9.0.1) pyaml (15.8.2) python-dateutil (2.5.3) python-lambda (2.2.0) PyYAML (3.11) s3transfer (0.1.11) setuptools (38.2.3) six (1.10.0) wheel (0.30.0)
They are all NOT part of my project but parts of python-lambda. They are therefore not needed on AWS Lambda to run my project.
How can I exclude these from deployment?
Those are the project depended packages Boto is the AWS SDK for Python it provides API services for Amazon services like S3, DynamoDB, SQS etc., Other packages are helpful to prepare to deploy the project into the lambda.
is there that we could make python-lambda make a temporary virtualenv, package all of the dependencies in that virtualenv and then upload that artifact to s3/lambda?
EDIT: @waldhol You can actually make it a smaller deployment by using the --use-requirements argument. This would mean you need to have a requirements.txt file in the folder containing service.py.
@karthich Thanks, that is exactly what I need.
I'll merge by EOD, Thanks!