-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installing SDK without botocore and other transitive dependencies #378
Comments
Incremental suggestion: The AWS Lambda Powertools are packaged such that it excludes boto3 etc, but users can include the SDK if desired (i.e. for local testing). https://github.com/awslabs/aws-lambda-powertools-python/releases/tag/v2.0.0 For example, installing locally and letting pip pick out the associated version of boto3 is managed via |
Hi @corey-cole - thanks for the request and for raising the Lambda powertools as an option. We are open to a PR for this enhancement, otherwise it will be on our backlog for now. |
Hi XRay team! I was wondering here if I could work on this and submit a PR. This is actually a huge improvement for anyone using the Lambda Runtime or even another container that comes with botocore as we can take ~77MB out of the deployment package. I've been using the XRAY SDK for Python for a long time, but this is the first time I've seen the build package and tests. I see that in Do you know if there is another alternative to solve this? It might be interesting if we can find a solution to do this without a breaking change. Thank you |
I see now that there's a issue listing big changes to v3, so if there's no option other than to a breaking change, I think we might as well add this in v3. |
I'm using the SDK in a Lambda function, meaning AWS automatically provides a fairly recent version of boto3/botocore and JMESPath. Installing botocore brings in 10MB of code and results in the overall deployment package being over the limit at which code can be displayed in the AWS console.
Is there a way to only install the SDK without it's dependencies? I suppose it's possible to have multiple requirements files and install the X-Ray one with "--no-dependencies", but that just pushes extra complication into CI/CD. It would be awesome if I could do something like "pip install aws-xray-sdk[core]" (or slim or whatever). I can accept that it might require a note that having a really new version of the SDK might have problems if my provided botocore is too old.
The text was updated successfully, but these errors were encountered: