Skip to content

Commit 72b6f14

Browse files
update create function to have env vars
1 parent 88ea88c commit 72b6f14

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

aws_lambda/aws_lambda.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,13 @@ def create_function(cfg, path_to_zip_file):
303303
Description=cfg.get('description'),
304304
Timeout=cfg.get('timeout', 15),
305305
MemorySize=cfg.get('memory_size', 512),
306+
Environment={
307+
'Variables': {
308+
key.strip('LAMBDA_'): value
309+
for key, value in os.envinron.items()
310+
if key.startswith('LAMBDA_')
311+
}
312+
},
306313
Publish=True
307314
)
308315

0 commit comments

Comments
 (0)