Skip to content

feat(memory): add boto3_session parameter to MemoryClient#330

Merged
tejaskash merged 1 commit intomainfrom
feat/boto3-session-memory-client
Mar 12, 2026
Merged

feat(memory): add boto3_session parameter to MemoryClient#330
tejaskash merged 1 commit intomainfrom
feat/boto3-session-memory-client

Conversation

@jariy17
Copy link
Contributor

@jariy17 jariy17 commented Mar 12, 2026

Issue #, if available:
#44

Description of changes:
Add optional boto3_session parameter to MemoryClient.__init__(), enabling named profiles, custom credentials, and other session-level configuration. This makes MemoryClient consistent with MemorySessionManager, which already accepts boto3_session.

Based on #90 by @manikawnth — rebased and updated to work with the current codebase.

Changes

  • Add boto3_session parameter to MemoryClient.__init__()
  • Use session.client() instead of boto3.client() for creating boto3 clients
  • Updated all tests to mock boto3.Session instead of boto3.client
  • Added tests for boto3_session parameter (with and without explicit region_name)

Test plan

  • All 112 unit tests pass
  • New tests for custom boto3_session usage

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Allow MemoryClient to accept an optional boto3.Session, consistent with
MemorySessionManager. This enables named profiles, custom credentials,
and other session-level configuration.
@jariy17 jariy17 force-pushed the feat/boto3-session-memory-client branch from 606034d to 6896275 Compare March 12, 2026 15:49
self.gmcp_client = session.client(
"bedrock-agentcore-control", region_name=self.region_name, config=client_config
)
self.gmdp_client = session.client("bedrock-agentcore", region_name=self.region_name, config=client_config)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it make sense to inject client configuration as well?

@tejaskash tejaskash merged commit 66c8488 into main Mar 12, 2026
24 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants