mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-04 20:28:10 +00:00
Use endpoint_url if provided with boto3 session for dynamodb (#11622)
- **Description:** Uses `endpoint_url` if provided with a boto3 session. When running dynamodb locally, credentials are required even if invalid. With this change, it will be possible to pass a boto3 session with credentials and specify an endpoint_url --------- Co-authored-by: Bagatur <baskaryan@gmail.com> Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
parent
18acc22f29
commit
3ad78e48e2
@ -53,7 +53,7 @@ class DynamoDBChatMessageHistory(BaseChatMessageHistory):
|
|||||||
kms_key_id: Optional[str] = None,
|
kms_key_id: Optional[str] = None,
|
||||||
):
|
):
|
||||||
if boto3_session:
|
if boto3_session:
|
||||||
client = boto3_session.resource("dynamodb")
|
client = boto3_session.resource("dynamodb", endpoint_url=endpoint_url)
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
import boto3
|
import boto3
|
||||||
|
Loading…
Reference in New Issue
Block a user