
上QQ阅读APP看书,第一时间看更新
Versioning Lambda functions
Suppose that we want to push a change to the function that we just created. Let's assume that the change is as simple as adding the time that the greeting took place. To version your Lambda function, go to the Actions drop-down menu on the Lambda configuration screen and click on Publish New Version.
You will be presented with a screen that looks like the following:
Once you click on Publish, a new version of your Lambda function will be created:
When you create a version, a copy of the current code and its configuration is made from the $LATEST version and tagged in a numerically incremental manner. Changes to code or configurations can only be done on the $LATEST version.
Switching to Version 1 and executing the code via the test harness, we can see that Version 1 provides the intended output, with the date of the greeting attached to the response:
