'Updating Lambda function to a new runtime
I have few Lambda Functions with Python 3.6 runtime. These Lambda functions belongs to their Lambda applications.
What is the best way to update the runtime to Python 3.8 or latest? How to test it ? All lambda functions are relating to our continuous deployment process.
Would updating Lambda Function will update the Lambda Application runtime as Lambda application is simply Lambda function with resources ?
Any help is appreciated
Solution 1:[1]
Python ensure a perfect retro-compatibility between versions.
This doesn’t mean that you don’t have to test, but that you can be really confident in the upgrade process.
You should first review the changelog for the versions you are bumping (so if from 3.6 to 3.8, review 3.7 and 3.8 changelogs).
You should test then. Either locally, if it makes sense, by creating a main that will call the handler, or by putting in lambda and testing in real conditions.
You will modify the definition (whatever it is, directly in the aws console, in SAM, in serverless framework, in cloudformation or whatever).
If something gets wrong, you should revert to 3.6 to have your process working and investigate separetely.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Floh |
