Skip to content

CRT Transfer Manager ignores endpoint URL scheme when determining SSL usage #4689

@palakg11

Description

@palakg11

Describe the bug

When using the CRT-based S3 transfer manager with a custom HTTP endpoint, the CRT client incorrectly uses SSL even when the endpoint URL scheme is http://. This causes connection failures because use_ssl=True is hardcoded in _create_crt_client().

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

The use_ssl parameter should be determined based on the endpoint URL scheme:

If endpoint URL starts with http:// → use_ssl=False
If endpoint URL starts with https:// → use_ssl=True
If no custom endpoint URL → use_ssl=True (default AWS endpoints)

Current Behavior

In boto3/crt.py, the _create_crt_client() function creates the CRT S3 client with use_ssl=True hardcoded, regardless of the endpoint URL scheme:

def _create_crt_client(session, config, region_name, cred_provider):
    """Create a CRT S3 Client for file transfer."""
    use_ssl = True  # Always True, ignores endpoint URL
    
    create_crt_client_kwargs = {
        'region': region_name,
        'use_ssl': use_ssl,
        'crt_credentials_provider': cred_provider,
    }
    return create_s3_crt_client(**create_crt_client_kwargs)

### Reproduction Steps

Try to do crt upload with http endpoint

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### SDK version used

1.42.16

### Environment details (OS name and version, etc.)

Ubuntu 22.04

Metadata

Metadata

Assignees

Labels

aws-crtp3This is a minor priority issues3

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions