Skip to content

Support AWS_S3_PREFERRED_TRANSFER_CLIENT environment variable for TransferConfig #4714

@crowecawcaw

Description

@crowecawcaw

Describe the feature

Add support for an AWS_S3_PREFERRED_TRANSFER_CLIENT environment variable that allows users to configure the
preferred_transfer_client setting for S3 transfers without modifying application code.

The environment variable would accept the same values as TransferConfig.preferred_transfer_client:

  • auto (default)
  • crt
  • classic

When set, this environment variable would be used as the default value for TransferConfig.preferred_transfer_client if no explicit value is provided to the TransferConfig constructor.

Use Case

I need to enable CRT transfers for an application that uses boto3 for S3 operations (condo), but I do not wan to modify the library's source code.

Current situation:

  • The library uses boto3's default TransferConfig, which means preferred_transfer_client='auto'
  • On non-optimized instances, this doesn't use CRT even though I have awscrt installed
  • To use CRT, I would need to fork the library or submit a PR to add TransferConfig configuration support

This feature would benefit:

  1. Using third-party libraries/applications without code modifications
  2. Operational flexibility (enable/disable CRT via environment without redeployment)

Proposed Solution

Above

Other Information

n/a

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

SDK version used

1.42.39

Environment details (OS name and version, etc.)

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestThis issue requests a feature.needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions