File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed
Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ def __init__(
5757 endpoint_url = None ,
5858 token_cache_size = 4096 ,
5959 stats = None ,
60+ max_pool_connections = 100
6061 ):
6162 """Create a KMSTokenValidator object.
6263
@@ -107,13 +108,15 @@ def __init__(
107108 aws_access_key_id = self .aws_creds ['AccessKeyId' ],
108109 aws_secret_access_key = self .aws_creds ['SecretAccessKey' ],
109110 aws_session_token = self .aws_creds ['SessionToken' ],
110- endpoint_url = endpoint_url
111+ endpoint_url = endpoint_url ,
112+ max_pool_connections = max_pool_connections
111113 )
112114 else :
113115 self .kms_client = kmsauth .services .get_boto_client (
114116 'kms' ,
115117 region = self .region ,
116- endpoint_url = endpoint_url
118+ endpoint_url = endpoint_url ,
119+ max_pool_connections = max_pool_connections
117120 )
118121 if extra_context is None :
119122 self .extra_context = {}
Original file line number Diff line number Diff line change 11"""Module for accessing boto3 clients, resources and sessions."""
22
33import boto3
4+ import botocore
45import logging
56
67CLIENT_CACHE = {}
@@ -13,7 +14,8 @@ def get_boto_client(
1314 aws_access_key_id = None ,
1415 aws_secret_access_key = None ,
1516 aws_session_token = None ,
16- endpoint_url = None
17+ endpoint_url = None ,
18+ max_pool_connections = None
1719 ):
1820 """Get a boto3 client connection."""
1921 cache_key = '{0}:{1}:{2}:{3}' .format (
@@ -37,7 +39,10 @@ def get_boto_client(
3739
3840 CLIENT_CACHE [cache_key ] = session .client (
3941 client ,
40- endpoint_url = endpoint_url
42+ endpoint_url = endpoint_url ,
43+ config = botocore .config .Config (
44+ max_pool_connections = max_pool_connections
45+ )
4146 )
4247 return CLIENT_CACHE [cache_key ]
4348
Original file line number Diff line number Diff line change 1313
1414from setuptools import setup , find_packages
1515
16- VERSION = "0.6.0 "
16+ VERSION = "0.6.1.dev1 "
1717
1818requirements = [
1919 # Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK)
You can’t perform that action at this time.
0 commit comments