How to update multiple Lambda functions from python 2.7 to 3.6

I have approximately 13 Lambda functions with triggers on python 2.7 runtime environments. I need to update to 3.6

What is the most efficient way to do this? Do I need to create all new lambdas? If issues arise will I be able to roll back to the 2.7 lambda?

Any help will be greatly appreciated.


If you want to do it the manual way go to the Lambda Console -> Actions -> Export Function -> Download Deployment Package. This will download a zip with the Lambda and any supporting libraries. This process can be reversed by createing a new Lambda with the correct name and role and runtime and then the Upload From -> .zip file option. This is how you can backup the Lambda's and re-instate them manually.

To update the runtime, just go into the Lambda console -> Code and Scroll to Runtime Settings to change the runtime. Depending what code your Lambda has jumping from Python 2 to 3 will probably not run - so just changing the runtime might not be the onlything you need to do.

If you want to script the update of the runtime then you can use the CLI command like this:

aws lambda update-function-configuration --function-name "YourFunctionName" --runtime "python3.6"