Langgraph ssl issue (boto 3 client)

Hey LangGraph team,

I’m running into a RecursionError: maximum recursion depth exceeded when my custom usage middleware invokes a boto3.resource('dynamodb') client inside the LangGraph runtime.

Context

I have a singleton usage tracking service that lazily initializes its DynamoDB client:

@property
def dynamodb(self):
    try:
        if self._dynamodb is None:
            self._dynamodb = boto3.resource(
                'dynamodb',
                aws_access_key_id=os.getenv("AWS_ACCESS_KEY_ID"),
                aws_secret_access_key=os.getenv("AWS_SECRET_ACCESS_KEY"),
                region_name=os.getenv("AWS_REGION", "eu-west-1")
            )
        return self._dynamodb
    except Exception as e:
        logger.error(f"Failed to initialize DynamoDB client: {e}")
        raise

This works locally, but inside the LangGraph deployed runtime, the first call to boto3.resource() triggers infinite recursion deep in ssl.py during SSL context setup.

Error trace (truncated)

RecursionError: maximum recursion depth exceeded
...
File "/usr/local/lib/python3.11/ssl.py", line 624, in options
    super(SSLContext, SSLContext).options.__set__(self, value)
[Previous line repeated 483 more times]

Analysis

This seems to stem from LangGraph’s API interacting with the ssl connection somehow:

My working theory:
when boto3botocore tries to set SSLContext.options, it recursively re-enters the patched setter.

Has anyone seen this recursion when using boto3 with LangGraph?

Thanks in advance — any guidance or known patches would be great.