@@ -36,6 +36,9 @@ def __init__(
36
36
timeout : int = 120 ,
37
37
memory_size : int = 128 ,
38
38
runtime : str = "python3.8" ,
39
+ vpc_config : dict = None ,
40
+ architectures : list = None ,
41
+ environment : dict = None ,
39
42
):
40
43
"""Constructs a Lambda instance.
41
44
@@ -66,6 +69,10 @@ def __init__(
66
69
timeout (int): Timeout of the Lambda function in seconds. Default is 120 seconds.
67
70
memory_size (int): Memory of the Lambda function in megabytes. Default is 128 MB.
68
71
runtime (str): Runtime of the Lambda function. Default is set to python3.8.
72
+ vpc_config (dict): VPC to deploy the Lambda function to. Default is None.
73
+ architectures (list): Which architecture to deploy to. Valid Values are
74
+ 'x86_64' and 'arm64', default is None.
75
+ environment (dict): Environment Variables for the Lambda function. Default is None.
69
76
"""
70
77
self .function_arn = function_arn
71
78
self .function_name = function_name
@@ -78,6 +85,9 @@ def __init__(
78
85
self .timeout = timeout
79
86
self .memory_size = memory_size
80
87
self .runtime = runtime
88
+ self .vpc_config = vpc_config
89
+ self .environment = environment
90
+ self .architectures = architectures
81
91
82
92
if function_arn is None and function_name is None :
83
93
raise ValueError ("Either function_arn or function_name must be provided." )
@@ -123,6 +133,9 @@ def create(self):
123
133
Code = code ,
124
134
Timeout = self .timeout ,
125
135
MemorySize = self .memory_size ,
136
+ VpcConfig = self .vpc_config ,
137
+ Environment = self .environment ,
138
+ Architectures = self .architectures ,
126
139
)
127
140
return response
128
141
except ClientError as e :
@@ -152,6 +165,7 @@ def update(self):
152
165
zipped_code_dir = self .zipped_code_dir ,
153
166
s3_bucket = self .s3_bucket ,
154
167
),
168
+ Architectures = self .architectures
155
169
)
156
170
return response
157
171
except ClientError as e :
0 commit comments