-
Notifications
You must be signed in to change notification settings - Fork 697
Description
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
BedrockModelconstructor pattern - Is a minimal, backwards-compatible change
Use Case
-
Local development with MinIO: Developers commonly run MinIO as a local S3-compatible object store for development. They need to set
endpoint_urltohttp://localhost:9000instead of AWS S3.session_manager = S3SessionManager( session_id="dev-session", bucket="dev-bucket", endpoint_url="http://localhost:9000", ) agent = Agent(session_manager=session_manager)
-
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
BedrockModelalready 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.