diff --git a/Dockerfile b/Dockerfile index 0c02899c..fc838627 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,4 +12,8 @@ COPY . . RUN pip install . -t ./python/lib/$runtime/site-packages # Remove *.pyc files -RUN find ./python/lib/$runtime/site-packages -name \*.pyc -delete \ No newline at end of file +RUN find ./python/lib/$runtime/site-packages -name \*.pyc -delete + +# Remove botocore (40MB) to reduce package size. aws-xray-sdk +# installs it, while it's already provided by the Lambda Runtime. +RUN rm -rf ./python/lib/$runtime/site-packages/botocore* \ No newline at end of file diff --git a/setup.py b/setup.py index c9e30978..a4639b29 100644 --- a/setup.py +++ b/setup.py @@ -32,13 +32,13 @@ 'ddtrace==0.28.0', 'wrapt==1.11.1', 'setuptools==40.8.0', - 'boto3==1.9.160' ], extras_require={ 'dev': [ 'nose2==0.9.1', 'flake8==3.7.7', - 'requests==2.21.0' + 'requests==2.21.0', + 'boto3==1.9.160', ] } ) diff --git a/tests/test_tags.py b/tests/test_tags.py index af4c8882..4ec9ca07 100644 --- a/tests/test_tags.py +++ b/tests/test_tags.py @@ -43,4 +43,3 @@ def test_get_runtime_tag(self): self.mock_python_version_tuple.return_value = ("3", "7", "2") self.assertEqual(get_runtime_tag(), "runtime:python3.7") - diff --git a/tests/test_wrapper.py b/tests/test_wrapper.py index bcb69a86..a45ca409 100644 --- a/tests/test_wrapper.py +++ b/tests/test_wrapper.py @@ -242,4 +242,3 @@ def lambda_handler(event, context): lambda_handler(lambda_event, get_mock_context()) self.mock_lambda_metric.assert_not_called() -