Skip to content

Commit 7053c05

Browse files
committed
Merge branch 'carhartl-publish-function-last'
* carhartl-publish-function-last: Make function publishing the last step
2 parents 5652ce8 + 5cfc022 commit 7053c05

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
@@ -478,7 +478,7 @@ def update_function(cfg, path_to_zip_file):
478478
client.update_function_code(
479479
FunctionName=cfg.get('function_name'),
480480
ZipFile=byte_stream,
481-
Publish=True,
481+
Publish=False,
482482
)
483483

484484
kwargs = {
@@ -507,6 +507,11 @@ def update_function(cfg, path_to_zip_file):
507507

508508
client.update_function_configuration(**kwargs)
509509

510+
# Publish last, so versions pick up eventually updated description...
511+
client.publish_version(
512+
FunctionName=cfg.get('function_name'),
513+
)
514+
510515

511516
def upload_s3(cfg, path_to_zip_file):
512517
"""Upload a function to AWS S3."""

0 commit comments

Comments
 (0)