Python Version AWS Lambda

The following table provides an overview of the Python versions supported by AWS SDK for Python:

NameOperating system
Python 3.9Amazon Linux 2
Python 3.8Amazon Linux 2
Python 3.7Amazon Linux
Python 3.6Amazon Linux
Python 2.7Amazon Linux

Boto3 is the Software Development Kit (SDK) for Python from Amazon Web Services (AWS). It provides you with a convenient API in Python to access Amazon services such as S3 and EC2.

All AWS Python SDKs for Boto3 use the "boto3-1.17.100 botocore-1.20.100" version (source). To learn how to install Boto3 on PyCharm visit this tutorial.

🛑 Important: Python 2.7 is depreciated as of 01/15/2021 and there is no support for it anymore since 07/15/2021. Please upgrade your installation accordingly. You can find the support and end-of-life announcements of Python versions here.

Will Python 2.7 AWS Lambda Functions Still Run?

Yes. The official AWS blog announced that Python 2.7 functions will still be allowed to run. This also holds for functions deployed as container images. But of course, they recommend upgrading for security and efficiency reasons.

How to Migrate From Python 2.7 to 3?

You can list all Python 2.7 functions in a specific region with this command in the AWS command-line interface:

aws lambda list-functions --function-version ALL --output text --query "Functions[?Runtime=='python2.7'].FunctionArn"

To upgrade from Python 2 to Python 3, consider the following guides:

I’d personally recommend the third of those tutorials.