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:


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.

Leave a Reply