From 9d7b49295fe6236b8b5eb6dfe44eb3b47225cf6b Mon Sep 17 00:00:00 2001 From: Chintan Raval Date: Thu, 10 Oct 2019 10:10:03 +1100 Subject: [PATCH 1/2] aws lambda as source - increase read timeout from default of 60 seconds to 200 seconds --- rdl/data_sources/AWSLambdaDataSource.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rdl/data_sources/AWSLambdaDataSource.py b/rdl/data_sources/AWSLambdaDataSource.py index 0913175..49fe9ef 100644 --- a/rdl/data_sources/AWSLambdaDataSource.py +++ b/rdl/data_sources/AWSLambdaDataSource.py @@ -4,7 +4,7 @@ import boto3 import time import datetime - +from botocore.client import Config from rdl.data_sources.ChangeTrackingInfo import ChangeTrackingInfo from rdl.data_sources.SourceTableInfo import SourceTableInfo from rdl.shared import Providers, Constants @@ -47,7 +47,8 @@ def __init__(self, connection_string, logger=None): ) self.aws_lambda_client = self.__get_aws_client( - self.AWS_SERVICE_LAMBDA, role_credentials + self.AWS_SERVICE_LAMBDA, role_credentials, + Config(read_timeout=200) ) self.aws_s3_client = self.__get_aws_client( self.AWS_SERVICE_S3, role_credentials @@ -182,12 +183,13 @@ def __assume_role(self, role_arn, session_name): return role_credentials - def __get_aws_client(self, service, credentials): + def __get_aws_client(self, service, credentials, config=None): return boto3.client( service_name=service, aws_access_key_id=credentials["AccessKeyId"], aws_secret_access_key=credentials["SecretAccessKey"], aws_session_token=credentials["SessionToken"], + config=config ) def __refresh_aws_clients_if_expired(self): From 2c40c9c0feeda428e8da5fa7acef0d51aff3c31d Mon Sep 17 00:00:00 2001 From: Chintan Raval Date: Thu, 10 Oct 2019 10:12:39 +1100 Subject: [PATCH 2/2] bump release version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6976b4b..6b82eb2 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="rdl", - version="0.1.14-beta", + version="0.1.24-beta", packages=find_packages(), install_requires=[ "numpy==1.16.2",