Skip to content

Commit a1b4895

Browse files
authored
Merge pull request nficano#94 from frnsys/master
Fix for handling S3 deployment arguments
2 parents 52b1e5c + 419ea87 commit a1b4895

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

aws_lambda/aws_lambda.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ def deploy_s3(
139139
use_s3 = True
140140
s3_file = upload_s3(cfg, path_to_zip_file, use_s3)
141141
if function_exists(cfg, cfg.get('function_name')):
142-
update_function(cfg, path_to_zip_file, use_s3, s3_file)
142+
update_function(cfg, path_to_zip_file, use_s3=use_s3, s3_file=s3_file)
143143
else:
144-
create_function(cfg, path_to_zip_file, use_s3, s3_file)
144+
create_function(cfg, path_to_zip_file, use_s3=use_s3, s3_file=s3_file)
145145

146146

147147
def upload(
@@ -459,7 +459,7 @@ def get_client(client, aws_access_key_id, aws_secret_access_key, region=None):
459459
)
460460

461461

462-
def create_function(cfg, path_to_zip_file, *use_s3, **s3_file):
462+
def create_function(cfg, path_to_zip_file, use_s3=False, s3_file=None):
463463
"""Register and upload a function to AWS Lambda."""
464464

465465
print('Creating your new Lambda function')
@@ -531,7 +531,7 @@ def create_function(cfg, path_to_zip_file, *use_s3, **s3_file):
531531
client.create_function(**kwargs)
532532

533533

534-
def update_function(cfg, path_to_zip_file, *use_s3, **s3_file):
534+
def update_function(cfg, path_to_zip_file, use_s3=False, s3_file=None):
535535
"""Updates the code of an existing Lambda function"""
536536

537537
print('Updating your Lambda function')

0 commit comments

Comments
 (0)