Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lambda function updating, publishing, versioning question

Would someone please clarify what happens when you update a Lambda function? Do you HAVE to "Publish a new version from $LATEST"? Or will the changes be available as soon as you hit Save?

The confirmation message in the Publish dialog sounds like something I don't want to do...

Publishing a new version saves a snapshot of the code and configuration of the $LATEST version. You can't edit the new version's code. Click to confirm.

and I'm being cautious because this is my first serious Lambda.

I have read the AWS page on versioning, but I'm still confused: https://docs.aws.amazon.com/lambda/latest/dg/versioning-intro.html

like image 731
motivus Avatar asked Mar 05 '23 18:03

motivus


1 Answers

Hitting save overwrites $LATEST.

Once you publish a version, a copy of $LATEST is made, and it's assigned a new numeric version identifier. That new numbered version is frozen, immutable, and can't be edited -- but you can still always edit $LATEST.

Invoking the function and specifying that assigned version number (it's on the end of the ARN) will thus always run exactly that same immutable code and associated configuration -- unless you subsequently delete the version.

This is just an informational message. You aren't going to make a mistake by publishing a new version.

like image 127
Michael - sqlbot Avatar answered Mar 18 '23 19:03

Michael - sqlbot