Botocore: Support SDK modularization on a service basis

Created on 31 Aug 2018  路  6Comments  路  Source: boto/botocore

A common use case may be to use some boto functions in a client app frozen with pyinstaller, in this case botocore will add 30MB to the install size.

Is there any plan to document how to trim the install size? For example:

  • Specify which services you are going to be using with setuptools install_extras
  • Archive old service definitions outside pypi package
feature-request

Most helpful comment

Any updates?
With aws lambda unpacked limit being 250 mb, the 42mb of botocore are really a lot

All 6 comments

As of right now we don't have any official guidance on slimming down the package size to remove unused services.

We wouldn't be able to do the second one as it's possible to specify that you want to use older API versions.

This is effectively a feature request to be able to modularize the the Python SDK in a similar fashion as some of the other SDKs (Java, ruby, etc). Marking as a feature request.

Any updates?
With aws lambda unpacked limit being 250 mb, the 42mb of botocore are really a lot

AWS JavaScript SDK V3 had pulled this off. It would be great to have the same for Boto3 which soon will be unusable for AWS Lambdas.

For those looking for a short-term solution.

A customer wrote an article demonstrating how to selectively discard services you are sure you don't use

https://blog.cubieserver.de/2020/building-a-minimal-boto3-lambda-layer/

Any kind of hint or indication that when this would be worked on?

1.3M    boto3
 55M    botocore
696K    dateutil
148K    jmespath
552K    s3transfer
 36K    six.py
824K    urllib3

Following up as we're now at 64M - I understand this would be a huge undertaking considering how these are created today, so I'm primarily interested in hearing whether the team is considering a modularization in the future.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jagill picture jagill  路  3Comments

jsha picture jsha  路  3Comments

stig picture stig  路  3Comments

jlucier picture jlucier  路  3Comments

kapilt picture kapilt  路  5Comments