Skip to content

The agent engineering platform.

Use endpoint_url if provided with boto3 session for dynamodb (#11622)

chevalmuscle3ad78e48e2db
diff --git a/libs/langchain/langchain/memory/chat_message_histories/dynamodb.py b/libs/langchain/langchain/memory/chat_message_histories/dynamodb.py
index 318afdce13..353356ef5b 100644
--- a/libs/langchain/langchain/memory/chat_message_histories/dynamodb.py
+++ b/libs/langchain/langchain/memory/chat_message_histories/dynamodb.py
@@ -53,7 +53,7 @@ class DynamoDBChatMessageHistory(BaseChatMessageHistory):
kms_key_id: Optional[str] = None,
):
if boto3_session:
- client = boto3_session.resource("dynamodb")
+ client = boto3_session.resource("dynamodb", endpoint_url=endpoint_url)
else:
try:
import boto3