DEV Community

Cover image for Python 2: 2020 End of Life (EOL) and What It Means For You, Plus Services Like AWS Lambda and Heroku
Derek Ardolf
Derek Ardolf

Posted on • Updated on • Originally published at icanteven.io

Python 2: 2020 End of Life (EOL) and What It Means For You, Plus Services Like AWS Lambda and Heroku

04/20/2020 UPDATE: Python 2.7.18 has been released, and Python 2 has come to an end. Read more here:

I just wanted to drop a little post into the universe that support for Python 2.7.x has officially stopped, and is at End of Life (EOL). The last update, 2.7.18 will be released in April 2020, of which all code updates are frozen right now. This is it.

What does this mean for people running Python 2.7? What does this mean for hosted/serverless solutions, like AWS Lambda or Heroku?

This post should help.

Python 2.x EOL Information

Name AWS Lambda Runtime Identifier PSF EOL Last Update Available AWS Lambda Python 2.7 EOL Heroku Python 2.7 EOL GCP App Engine Python 2.7 EOL
Python 2.7 python2.7 January 1, 2020 April 20 2020 December 31, 2020 February 1, 2021 Unspecified Date

General Information About Python 2.7 EOL

From the Official Python release schedule page for 2.7:1

Being the last of the 2.x series, 2.7 will receive bugfix support until 2020. Support officially stops January 1 2020, but the final release will occur after that date.

Planned future release dates:

  • 2.7.18 code freeze January, 2020
  • 2.7.18 release candidate early April, 2020
  • 2.7.18 mid-April, 2020

The last update, releasing in April, is now in code freeze. You can see the discussion around this here: The CPython Developer's Guide - Update Python 2.7 EOL date

Additional Resource Links

"...the following projects have pledged to drop support for Python 2.7 no later than 2020, coinciding with the Python development team’s timeline for dropping support for Python 2.7."

AWS Lambda Python 2.7 Runtime

AWS Lambda will actually continue to apply critical security patches until at least the end of 2020:

To allow you additional time to prepare, AWS Lambda will continue to provide critical security patches for the Python 2.7 runtime until at least December 31, 2020. Lambda’s scope of support includes the Python interpreter and standard library, but does not extend to third-party packages.2

Simple Auditing of AWS Lambda Runtimes

For a simple place to start, when it comes to auditing what AWS Lambdas are using the python2.7 runtime, we can run the following awscli3 command (using default --region, --profile, and --output config values):

# Add --region, --profile, and --output args if needed
aws lambda list-functions --query 'Functions[?Runtime==`python2.7`]'

# -OR-
# If wanting only the names of the functions
# Add --region, --profile, and --output args if needed
aws lambda list-functions --query 'Functions[?Runtime==`python2.7`].FunctionName'
Enter fullscreen mode Exit fullscreen mode

Want an alternate take using PowerShell4 instead? Using the AWSPowerShell5 for Windows or AWSPowerShell.NetCore6 for Linux or Mac OS module:

# Install-Module AWSPowerShell
# -OR-
# Install-Module AWSPowerShell.NetCore

# Add -Region and -ProfileName parameters if needed
(Get-LMFunctionList).where({$_.Runtime -eq 'python2.7'})
Enter fullscreen mode Exit fullscreen mode

Ontop of this, AWS will make sure to notify customers as support gets closer to deprecation:

In most cases, the end-of-life date of a language version or operating system is known well in advance. If you have functions running on a runtime that will be deprecated in the next 60 days, Lambda notifies you by email that you should prepare by migrating your function to a supported runtime. In some cases, such as security issues that require a backwards-incompatible update, or software that doesn't support a long-term support (LTS) schedule, advance notice might not be possible.7

Heroku Python 2.7 Apps

Heroku gives the rundown in their Python 2.7 FAQ, providing information about how Python 2.7.17 apps will still run until April 2023 but will no longer fall under their support policy after February 1st, 2021:

You do not need to do anything to keep using Python 2. Python 2.7.17 applications will continue to build and run on Heroku 18 for the lifetime of the stack, until April 2023.

However, Python 2.7 on Heroku will no longer receive security updates after January 1, 2020, as it has reached it’s community specified end of life date.

Because of this, Heroku platform support for these applications will end as soon as February 1st, 2021. On that sunset date, these applications will continue to build and run, but they will no longer fall under our Support Policy.8

Discussion

Have any thoughts to add, or information to share? Jump into the conversation below! I'll try to keep this article updated with any new information that seems like it should be in here.


Originally published at https://icanteven.io on January 12th, 2020


  1. Python.Org: PEP 373 -- Python 2.7 Release Schedule 

  2. AWS Compute Blog: Continued support for Python 2.7 on AWS Lambda 

  3. Need help with the AWS CLI before? Learn how to install and configure it here: AWS Command Line Interface 

  4. PowerShell Core on GitHub 

  5. Get AWSPowerShell For Windows: Installing the AWS Tools for PowerShell on Windows 

  6. Get AWSPowerShell.NetCore for Linux and Mac OS: Installing AWS Tools for PowerShell on Linux or macOS 

  7. AWS Lambda - Runtime Support Policy 

  8. Heroku: Python 2.7 FAQ 

Top comments (0)