Skip to content

Commit 5465d93

Browse files
author
Marcel Radischat
authored
Merge pull request #6 from carhartl/publish-function-last
Make function publishing the last step
2 parents 73f6ce5 + e7b17e4 commit 5465d93

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

aws_lambda/aws_lambda.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def update_function(cfg, path_to_zip_file):
314314
client.update_function_code(
315315
FunctionName=cfg.get('function_name'),
316316
ZipFile=byte_stream,
317-
Publish=True
317+
Publish=False
318318
)
319319

320320
client.update_function_configuration(
@@ -326,6 +326,11 @@ def update_function(cfg, path_to_zip_file):
326326
MemorySize=cfg.get('memory_size', 512)
327327
)
328328

329+
# Publish last, so versions pick up eventually updated description...
330+
client.publish_version(
331+
FunctionName=cfg.get('function_name')
332+
)
333+
329334

330335
def function_exists(cfg, function_name):
331336
"""Check whether a function exists or not"""

0 commit comments

Comments
 (0)