Skip to content

Commit 8d5827e

Browse files
author
Riley James
committed
added VpcId field
1 parent 5292553 commit 8d5827e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

aws_lambda/aws_lambda.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,11 @@ def create_function(cfg, path_to_zip_file, *use_s3, **s3_file):
498498
'Timeout': cfg.get('timeout', 15),
499499
'MemorySize': cfg.get('memory_size', 512),
500500
'Publish': True,
501+
'VpcConfig': {
502+
'VpcId': cfg.get('vpc_id'),
503+
'SubnetIds': cfg.get('subnet_ids', []),
504+
'SecurityGroupIds': cfg.get('security_group_ids', []),
505+
},
501506
}
502507
else:
503508
kwargs = {
@@ -510,6 +515,11 @@ def create_function(cfg, path_to_zip_file, *use_s3, **s3_file):
510515
'Timeout': cfg.get('timeout', 15),
511516
'MemorySize': cfg.get('memory_size', 512),
512517
'Publish': True,
518+
'VpcConfig': {
519+
'VpcId': cfg.get('vpc_id'),
520+
'SubnetIds': cfg.get('subnet_ids', []),
521+
'SecurityGroupIds': cfg.get('security_group_ids', []),
522+
},
513523
}
514524

515525
if 'environment_variables' in cfg:
@@ -573,6 +583,7 @@ def update_function(cfg, path_to_zip_file, *use_s3, **s3_file):
573583
'Timeout': cfg.get('timeout', 15),
574584
'MemorySize': cfg.get('memory_size', 512),
575585
'VpcConfig': {
586+
'VpcId': cfg.get('vpc_id'),
576587
'SubnetIds': cfg.get('subnet_ids', []),
577588
'SecurityGroupIds': cfg.get('security_group_ids', []),
578589
},

0 commit comments

Comments
 (0)