Skip to content
This repository was archived by the owner on Mar 13, 2020. It is now read-only.

Commit 9d7b492

Browse files
committed
aws lambda as source - increase read timeout from default of 60 seconds to 200 seconds
1 parent dc8205f commit 9d7b492

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

rdl/data_sources/AWSLambdaDataSource.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import boto3
55
import time
66
import datetime
7-
7+
from botocore.client import Config
88
from rdl.data_sources.ChangeTrackingInfo import ChangeTrackingInfo
99
from rdl.data_sources.SourceTableInfo import SourceTableInfo
1010
from rdl.shared import Providers, Constants
@@ -47,7 +47,8 @@ def __init__(self, connection_string, logger=None):
4747
)
4848

4949
self.aws_lambda_client = self.__get_aws_client(
50-
self.AWS_SERVICE_LAMBDA, role_credentials
50+
self.AWS_SERVICE_LAMBDA, role_credentials,
51+
Config(read_timeout=200)
5152
)
5253
self.aws_s3_client = self.__get_aws_client(
5354
self.AWS_SERVICE_S3, role_credentials
@@ -182,12 +183,13 @@ def __assume_role(self, role_arn, session_name):
182183

183184
return role_credentials
184185

185-
def __get_aws_client(self, service, credentials):
186+
def __get_aws_client(self, service, credentials, config=None):
186187
return boto3.client(
187188
service_name=service,
188189
aws_access_key_id=credentials["AccessKeyId"],
189190
aws_secret_access_key=credentials["SecretAccessKey"],
190191
aws_session_token=credentials["SessionToken"],
192+
config=config
191193
)
192194

193195
def __refresh_aws_clients_if_expired(self):

0 commit comments

Comments
 (0)