Skip to content

[FEATURE] Add endpoint_url parameter to S3SessionManager for S3-compatible storage backends #1794

@tealgreen0503

Description

@tealgreen0503

Problem Statement

S3SessionManager currently creates its internal boto3 S3 client with limited configuration options (boto_session, boto_client_config, region_name), but does not accept endpoint_url. This makes it impossible to use S3SessionManager with S3-compatible storage backends such as MinIO or LocalStack, which require a custom endpoint URL.

This is a very common need for local development and testing. For comparison, BedrockModel already supports endpoint_url as a first-class constructor parameter (bedrock.py L131), so there is precedent for this pattern within the SDK.

Proposed Solution

Add an explicit endpoint_url parameter to S3SessionManager.__init__() and forward it to the internal session.client() call, matching the existing BedrockModel pattern.

session_manager = S3SessionManager(
    session_id="my-session",
    bucket="my-bucket",
    endpoint_url="http://localhost:9000",  # New parameter
)

This approach:

  • Is consistent with the existing BedrockModel constructor pattern
  • Is a minimal, backwards-compatible change

Use Case

  1. Local development with MinIO: Developers commonly run MinIO as a local S3-compatible object store for development. They need to set endpoint_url to http://localhost:9000 instead of AWS S3.

    session_manager = S3SessionManager(
        session_id="dev-session",
        bucket="dev-bucket",
        endpoint_url="http://localhost:9000",
    )
    agent = Agent(session_manager=session_manager)
  2. VPC endpoints / PrivateLink: In production AWS environments, teams may need to route S3 traffic through VPC endpoints using custom endpoint URLs — the same use case that BedrockModel already supports.

Alternatives Solutions

No response

Additional Context

Current S3SessionManager client creation (s3_session_manager.py L85):

self.client = session.client(service_name="s3", config=client_config)

BedrockModel already forwards endpoint_url (bedrock.py L171-176):

self.client = session.client(
    service_name="bedrock-runtime",
    config=client_config,
    endpoint_url=endpoint_url,
    region_name=resolved_region,
)

The proposed change would simply align S3SessionManager with this established pattern.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions