File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ def __init__(
31
31
s3_bucket : str = None ,
32
32
script : str = None ,
33
33
handler : str = None ,
34
- session : Session = Session () ,
34
+ session : Session = None ,
35
35
timeout : int = 120 ,
36
36
memory_size : int = 128 ,
37
37
runtime : str = "python3.8" ,
@@ -73,7 +73,7 @@ def __init__(
73
73
self .script = script
74
74
self .handler = handler
75
75
self .execution_role_arn = execution_role_arn
76
- self .session = session
76
+ self .session = session if session is not None else Session ()
77
77
self .timeout = timeout
78
78
self .memory_size = memory_size
79
79
self .runtime = runtime
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ def s3_client(sagemaker_session):
53
53
54
54
55
55
def test_lambda_object_with_arn_happycase ():
56
- lambda_obj = lambda_helper .Lambda (function_arn = LAMBDA_ARN )
56
+ lambda_obj = lambda_helper .Lambda (function_arn = LAMBDA_ARN , session = sagemaker_session )
57
57
assert lambda_obj .function_arn == LAMBDA_ARN
58
58
59
59
You can’t perform that action at this time.
0 commit comments