Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions aws_lambda/aws_lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ def deploy_s3(
use_s3 = True
s3_file = upload_s3(cfg, path_to_zip_file, use_s3)
if function_exists(cfg, cfg.get('function_name')):
update_function(cfg, path_to_zip_file, use_s3, s3_file)
update_function(cfg, path_to_zip_file, use_s3=use_s3, s3_file=s3_file)
else:
create_function(cfg, path_to_zip_file, use_s3, s3_file)
create_function(cfg, path_to_zip_file, use_s3=use_s3, s3_file=s3_file)


def upload(
Expand Down Expand Up @@ -459,7 +459,7 @@ def get_client(client, aws_access_key_id, aws_secret_access_key, region=None):
)


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

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


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

print('Updating your Lambda function')
Expand Down