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
15 changes: 12 additions & 3 deletions lambda_uploader/uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,24 @@ def upload_package(pkg, config):
existing_function = False
LOG.debug("function not found creating new function")

response = ''
if existing_function:
LOG.debug('running update_function_code')
response = client.update_function_code(
FunctionName=config.name,
ZipFile=zip_file,
Publish=config.publish,
)
LOG.debug("AWS update_function_code response: %s" % response)
LOG.debug('running update_function_configuration')
response = client.update_function_configuration(
FunctionName=config.name,
Handler=config.handler,
Role=config.role,
Description=config.description,
Timeout=config.timeout,
MemorySize=config.memory,
)
LOG.debug("AWS update_function_configuration response: %s" % response)
else:
LOG.debug('running create_function_code')
response = client.create_function(
Expand All @@ -54,5 +64,4 @@ def upload_package(pkg, config):
MemorySize=config.memory,
Publish=config.publish,
)

LOG.debug("AWS create_function response: %s" % response)
LOG.debug("AWS create_function response: %s" % response)