Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 609
MaxxABillion Avatar asked Jun 17 '26 12:06

MaxxABillion


1 Answers

You can try Runtime Settings below your code inside the AWS Management Console for your lambda handler. There you can choose your runtime (eg. Python 3.8 or 2.7). Up to you to fix all back-compatibility issues.

Obviously, this means you need to do this for each one of your handlers. A better way, if you aren't doing this already is to use serverless and deploy your stack from a serverless.yaml configuration file.

Beware that from mid-July 2021 AWS will start the 1st phase of their end of python 2.7 support. So, for a more future-proof solution, good to take this under consideration.

Hope this helps a bit.

like image 179
Markonick Avatar answered Jun 20 '26 01:06

Markonick



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!