You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enhancement: support custom boto3.Session in MemoryClient #44
Is your feature request related to a problem? Please describe.
I'm always frustrated when I want to specify an AWS profile or use a custom boto3.Session to create Bedrock AgentCore clients, but the code always uses the default boto3.client(...) calls and doesn’t allow passing in a session. This prevents usage of named profiles or custom session configurations.
Describe the solution you'd like
I’d like to add an optional boto3_session: boto3.Session | None = None parameter to MemoryClient.__init__. Internally:
Manually patching the class in local code, but that’s tedious and not reusable.
Using environment variables (AWS_PROFILE, AWS_ACCESS_KEY_ID, etc.), but that isn't flexible for CI or code‑based configuration.
Additional context
This change would be consistent with other AWS SDK usage patterns where clients accept a session parameter. It improves flexibility and testability, especially for scenarios involving multiple AWS profiles or test harness setups.
Activity
jona62 commentedon Oct 2, 2025
The new MemorySessionManager now supports passing custom boto3.Session and BotocoreConfig.
To get this new construct, run the following command
feat(memory): add boto3_session parameter to MemoryClient