Google App Engine Jan 2024 deprecation: What you need to know
Tags: webdev, python, programming, devops
Published: 2023-12-23 02:53:24

<!-- Google App Engine Jan 2024 deprecation: What you need to know -->
<!-- Exploring Google App Engine in 2023-2024 (GAE: part 1/many) -->

## TL;DR:
Google App Engine (GAE) **is not shutting down**. Instead, the 1st-generation (and older 2nd-generation) runtimes will reach ["end-of-support" at **the end of Jan 2024**](https://cloud.google.com/appengine/docs/standard/lifecycle/support-schedule).

### Affected GAE runtimes
While Python 2 users are the focus of this post, all of the following runtimes are affected:

- Python 2.7
    - Python 2.5 was already [deprecated in 2013](http://googleappengine.blogspot.com/2013/03/python-25-thanks-for-good-times.html) and [shutdown in 2017](https://cloud.google.com/appengine/docs/standard/python/python25)
- Python 3.7
- Java 8
- PHP 5 & 7
- Go 1.11-1.18
- Ruby 2
- Node.js 10-16

Overall, this deprecation significantly affects developers belonging to one of these groups:

Scenario | How affected | Action
--- | --- | ---
**You _regularly_ deploy affected apps to App Engine** | Cannot deploy apps starting Feb 2024 | Immediately: a) upgrade to currently-supported runtime to stay on GAE, b) stay on 2.x but shift workload elsewhere, c) freeze your app, or d) ask for exception (see "Quick summary" below)
**You have affected apps but do _NOT_ regularly deploy them to App Engine** | Apps continue to run but clock ticking | Start exploring one of the options above
<figcaption>Affected-by-deprecation chart</figcaption>

### Quick summary of options
1. Upgrade to Python 3.8+ (or other supported runtime: Java 11+, PHP 8+, Go 1.19+, Ruby 3+, Node 18+) to stay on GAE
1. Stay on Python 2 (or other affected runtime) but shift workload to another GCP serverless platform: Cloud Run^
1. Stay on Python 2 but shift workload to GCP VM-based solutions like Kubernetes/GKE or Compute Engine^
1. Stay on Python 2 but shift workload off GCP^
1. Stay on Python 2 but freeze your app, meaning no app updates or new deployments (leave it as-is)
1. Ask for an exception

_^ &mdash; requires migrating away from GAE bundled services_


## Prologue
Happy holidays, and welcome to the blog focused on using Google APIs from Python and sometimes Node.js. The previous post series focused on credentials types, for example, [OAuth client IDs](https://dev.to/wescpy/series/23343), primarily used for [Google Workspace (GWS) APIs](http://developers.google.com/gsuite), and [API keys](https://dev.to/wescpy/series/25404), primarily used for [Google Maps APIs](http://developers.google.com/maps). API keys are used by many _other_ Google API families, such as [YouTube](http://developers.google.com/youtube), [Google Cloud](http://cloud.google.com) (GCP), and also GWS. While the next series finally tackles the 3rd credential type supported by Google APIs, [service accounts](http://cloud.google.com/iam/docs/service-account-overview), we're taking a temporary detour to discuss another Google developer product: [Google App Engine](https://cloud.google.com/appengine).


## Introduction
We'll do a deeper dive introducing App Engine in an upcoming post but wanted to focus just on a product deprecation today, a big one. For now, you only need to know that App Engine lets developers host applications in the cloud without having to be concerned with its infrastructure, or "what it runs on" basically. You write a web app (or mobile backend), and without thinking about virtual machines (VMs) or Kubernetes, upload that app to GAE, and it runs your app in the cloud, autoscaling if necessary. The product has a major update coming at the end of Jan 2024.

Google originally [launched the platform back in 2008](http://googleappengine.blogspot.com/2008/04/introducing-google-app-engine-our-new.html) ([video](http://youtu.be/3Ztr-HhWX1c))—its first cloud product actually—giving rise to serverless computing and the cloud computing Platform-as-a-Service (PaaS) service level. It originally launched supporting Python 2.5, later upgrading to 2.7, and also added language support for Java, Go, and PHP. A decade later, the [2nd-generation platform launched](https://cloud.google.com/blog/products/gcp/introducing-app-engine-second-generation-runtimes-and-python-3-7), adding support for Python 3+, Java 11+, Go 1.12+, PHP 7+, and adding new support for Ruby and Node.js.

All older apps, however, remained on the 1st-generation platform. Even with the [sunset of Python 2](http://python.org/doc/sunset-python-2), Java 8, PHP 5, and Go 1.11, by their respective communities, the Google Cloud team assured users by expressing [continued long-term support of these legacy runtimes](https://cloud.google.com/appengine/docs/standard/long-term-support), including [maintaining the Python 2 runtime](https://cloud.google.com/python/docs/python2-sunset) until vendor support was no longer available. That time is now, so Google is finally deprecating its support as well.


## Python 2.7 deprecation notice
All of the [Python 2 App Engine documentation today](https://cloud.google.com/appengine/docs/legacy/standard/python/how-to) displays a somewhat concerning but necessary notice at the top:

![Python 2 App Engine deprecation notice](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tvv9hywfa38ukj98g9ny.png)

It reads as:
> **Note:** Python 2.7 will reach the [end of support](https://cloud.google.com/appengine/docs/standard/lifecycle/runtime-lifecycle#end_of_support) on January 31, 2024. After this date, your existing Python 2.7 applications will continue to run and receive traffic. However, you cannot deploy new or update existing applications that use runtimes [after their end of support date](https://cloud.google.com/appengine/docs/standard/lifecycle/support-schedule#python). We recommend that you [migrate to the latest supported version of Python](https://cloud.google.com/appengine/migration-center/standard/migrate-to-second-gen/python-differences).

There's still time for you to take action. Let's discuss.


## What does "end of support" mean?
The deprecation notice doesn't spill all the beans, but here are the key takeaways about what "end of support" means:

1. Users can no longer deploy new apps or new versions of existing apps using affected runtimes.
1. Already-deployed apps will stay up-and-running and receiving traffic.
1. If your app is "mission-critical," you may be able to get an exception
1. Per the [documentation](https://cloud.google.com/appengine/docs/standard/lifecycle/runtime-lifecycle#end_of_support): _Google will no longer apply security updates,_ and apps _will not be eligible for technical support_.

So what does this mean for developers, or more importantly, what do you need to know?


## What you need to know
Is this you? | Action Item
--- | ---
Your app uses an "end of support" runtime like Python 2, but you don't (or can't) update or (re)deploy it. | Your app continues to run beyond the "end of support" date, but you can no longer update it at all. It will run as-is until the _decommission date_ (none published yet); start looking at your options (migrate, move, etc.) while you have time.
Your app uses an "end of support" runtime, and you update it "regularly." | You are directly impacted because after the "end of support" date, you will no longer be able to deploy your app. Take action **now**. Your options depend on whether you want to stay on App Engine or move elsewhere. Much more in the upcoming section on [Migration Options](#migration-options).
You're a consultant that regularly creates new App Engine apps for clients but they use an "end of support" runtime. | Similar to the above, you're impacted directly and will no longer be able to deploy new apps using affected runtimes. Craft all subsequent projects using a supported runtime.
Your "end of support" runtime app is "mission-critical." Can I get an exception? | This may be possible. According to the [documentation](https://cloud.google.com/appengine/docs/standard/lifecycle/runtime-lifecycle#end_of_support): _In certain cases, Google may permit your Organization to re-enable deployments.... Deployments for legacy runtimes can be re-enabled using an [organization policy](https://cloud.google.com/appengine/docs/standard/long-term-support#enabling_deployments_for_runtimes_reaching_end_of_support)._
I don't have a Python 2 app... my GAE apps are written in Java, PHP, Go, Ruby, or Node.js/JavaScript. Am I affected? | The "end of support" date affects more than just Python 2 users. All 1st-generation and older 2nd-generation runtimes are affected, meaning you should also upgrade _those_ apps to a [GAE-supported runtime](https://cloud.google.com/appengine/docs/standard/lifecycle/support-schedule) or consider moving your app elsewhere.
I have an app using an "end of support" runtime and am concerned about this deprecation but don't know what to do. | Contact your original developer(s) or consultant(s) on upgrading or migrating. If you cannot find them, have exhausted all your options, or don't know what else to do, complete the form at <https://appenginemigrations.com> to see if I can help and have availability.
<figcaption>Options for affected users</figcaption>

<!--
1. **Is this you?** You have a Python 2 App Engine app, but you don't (or can't) update it. **Action item:** Nothing required of you until _decommission date_ (none published yet), but you should start looking to migrate to Python 3 while you have time.
1. **Is this you?** You have a Python 2 App Engine app, and you update it "regularly." **Action item:** You are directly impacted because after the "end of support" date in Jan 2024, you will no longer be able to deploy your app. Take action **now**. Your options include: 1) Port your app to Python 3 App Engine, 2) [Migrate off the GAE bundled services and shift your app](https://goo.gle/3geAqFs) to [Cloud Run](http://cloud.run) which can still run Python 2 apps, 3) move to on-prem or otherwise off GCP entirely.
1. **Is this you?** You're a consultant that regularly creates new Python 2 App Engine apps for clients. **Action item:** Similar to the above, you're impacted directly and will no longer be able to deploy new Python 2 App Engine apps. Craft all subsequent projects in Python 3.
1. **Is this you?** Your app is "mission-critical." Can I get an exception? **Action item:** This may be possible. According to the [documentation](https://cloud.google.com/appengine/docs/standard/lifecycle/runtime-lifecycle#end_of_support): _In certain cases, Google may permit your Organization to re-enable deployments.... Deployments for legacy runtimes can be re-enabled using an [organization policy](https://cloud.google.com/appengine/docs/standard/long-term-support#enabling_deployments_for_runtimes_reaching_end_of_support)._
1. **Is this you?** I don't have a Python 2 app... my GAE apps are written in Java, PHP, Go, Ruby, or Node.js/JavaScript. Am I affected? **Action item:** The "end of support" date affects more than just Python 2 users. All 1st-generation and older 2nd-generation runtimes are affected, meaning you should also upgrade _those_ apps to a [GAE-supported runtime](https://cloud.google.com/appengine/docs/standard/lifecycle/support-schedule) or consider Cloud Run as described above. Bottom-line: **this deprecation affects you** if you're using **any of these runtimes**: Python 2, Python 3.7, Java 8, Go 1.12-1.18, PHP 5, PHP 7, Ruby 2, or Node.js 10-16.
1. **Is this you?** I have a Python 2 app, am concerned about this deprecation, but don't know what to do. **Action item:** Contact your original developer(s)/consultant(s) on upgrading or migrating. I may be available if you cannot find them, have exhausted all your options, or don't know what else to do. Complete the form at <https://appenginemigration.com> to see if I can help and confirm availability.
-->

## Migration options
If you don't take any action now, your app using an "end of support" runtime like Python 2 will continue to run on GAE as-is, even after the coming "end of support" date. At that time, there can be no new deployments and no tech support. **Now** is a _great_ time to take some action to either upgrade to a supported runtime or move to another solution that still supports specific languages and versions of affected runtimes.


### Bundled services considerations
Early users are familiar with the set of original "App Engine APIs" like Datastore, Memcache, Task Queue, Blobstore, etc., now collectively referred to as [GAE "bundled services"](https://cloud.google.com/appengine/docs/standard/services/overview) that help power your apps. Bundled services are only available in runtimes that were part of GAE's 1st-generation platform (Python 2, Java 8, Go 1.11 & older, PHP 5). Runtimes that never had a 1st-generation version (Ruby, Node.js) do **not** (and _will not_) have (or get) bundled services.

When the GAE 2nd-generation service [launched in 2018](https://cloud.google.com/blog/products/gcp/introducing-app-engine-second-generation-runtimes-and-python-3-7), the team omitted these bundled services as they tied apps to the platform, meaning they could only run on GAE. By removing the bundled services, developers could now choose the best-of-breed alternatives so their apps are portable to other GCP or even non-GCP hosting platforms. The only challenge was that existing developers were required to migrate away from those bundled services in order for their app to run on newer runtimes only supported by the 2nd-generation platform, e.g., Python 3, Java 11, Go 1.12+, PHP 7.

Unfortunately, it was mutually exclusive to do so, meaning while you could upgrade language releases, say to Python 3, that migration is paired with a possibly greater migration away from the bundled services, making the entire move (to the 2nd-generation platform) a showstopper for many users. For this reason, the App Engine team [added most of the bundled services in 2021](https://cloud.google.com/blog/products/serverless/support-for-app-engine-services-in-second-generation-runtimes) to the 2nd-generation runtimes for languages that had a 1st-generation runtime (Python, Java, Go, PHP).

The purpose of the entire release was to help with users upgrade language releases to Python 3 (or Java 11+, Go 1.12+, PHP 8) and finally being able to run on the 2nd-generation platform. Once apps were ported to updated language versions, developers could then migrate off the bundled services on their own terms and timelines, splitting up two potentially challenging migrations. All this said, what are the available options for "end of support" runtime developers now?


### Options for "end of support" runtime apps
If you've got a Python 2 (or affected) app, here are your choices (and any additional caveats/notes):
1. Stay on 2.x but **freeze your app**: no app updates or new deployments (good until decommission)
1. Bundled services users can **port to Python 3.8+** (or Java 11+, PHP 8+, Go 1.19+) to stay on GAE
    - Ruby 2 & Node 10-16 users must upgrade to Ruby 3+ & Node 18+ to remain on GAE (no bundled services)
1. Stay on 2.x but **shift workload to another GCP serverless platform**: [Cloud Run](http://cloud.run) (GCR)
    - Requires [migrating away from GAE bundled services](https://cloud.google.com/appengine/migration-center/standard/services/migrating-services)
    - [How to migrate a sample app from GAE to GCR](https://goo.gle/3geAqFs) (Docker use required)
    - Solution only works as long as Python 2 Docker base images exist
    - [Cloud Functions](https://cloud.google.com/functions) (GCF) does not support Python 2
1. Stay on 2.x but **shift workload to GCP VM-based solution** like [Kubernetes/GKE](https://cloud.google.com/gke) or [Compute Engine](https://cloud.google.com/compute)
    - Requires migrating away from GAE bundled services
1. Stay on 2.x but **shift workload to non-GCP compute platform**
    - Requires migrating away from GAE bundled services
1. **Ask for an [exception](https://cloud.google.com/appengine/docs/standard/lifecycle/runtime-lifecycle#end_of_support)** (per entry in above chart)


### Migrating to Cloud Run

For those wishing to remain on Python 2, Cloud Run is an option as it there's still a Python 2 Docker base image. The only real challenge is to migrate off the GAE bundled services. If you're willing to do so, then it's certainly a good option. I created some content if you want to experiment and [migrate a sample app from GAE to GCR](https://goo.gle/3geAqFs) with Docker.

Furthermore, to help developers better understand the [GCP serverless platforms](https://cloud.google.com/serverless) (App Engine, Cloud Functions, Cloud Run), learn the differences between them, and see how to shift apps between them, e.g., from GAE to GCF or GCR, check out [this sample application](http://goo.gle/2Y0ph5q) I created that can be deployed to _all_ three platforms **with no code changes**. There's also a [corresponding video](http://youtu.be/eTotLOVR7MQ) that walks through deploying Node.js, Python 2, and Python 3 versions of that app to all platforms.


### Migrating off GAE bundled services
Using the bundled services is certainly convenient and familiar to long-time GAE users, but recognize they are proprietary Google services, restricting apps from leaving the GAE platform. Developers who want more flexibility, including being able to move their apps _off_ of GAE, should migrate away from the GAE bundled services. The good news is that many of them have matured enough to now be available as "new" standalone GCP services.

I created a set of [hands-on tutorials](https://developers.googleblog.com/2021/03/modernizing-your-google-app-engine-applications.html?utm_source=ext&utm_medium=partner&utm_campaign=CDR_wes_aap-serverless_modernizegae_codelabsannounce_201031&utm_content=-) ("codelabs") as well as [overview videos](https://developers.googleblog.com/2021/06/introducing-serverless-migration.html?utm_source=blog&utm_medium=partner&utm_campaign=CDR_wes_aap-serverless_smsintro_201023) covering migration away from the key bundled services including "before" and "after" sample apps so you can familiarize yourself with the migrations.


## Summary
The "end of support" date is coming soon, and it affects developers who update their apps regularly: you will no longer be able to do so in Feb 2024. Python 2 (and other affected runtime) apps will remain up and serving requests after that date, giving developers time to work on upgrading to a supported GAE runtime. Timing is of the essence as this date marks a line in the sand for you to work on a migration solution that can be slowly eased-in to take the place of its predecessor. Your old app can stay up and serving your users while you craft a replacement. When ready, launch the replacement service gradually, taking some traffic, working out bugs, until you can completely drop the old app.

I recommend app owners start that project or contact their original developer(s) as soon as possible. If all else fails, I may be available; contact me at <https://appenginemigrations.com>. Also review the [story of one developer who successfully completed this upgrade](https://www.gqueues.com/blog/how-to-migrate-from-google-app-engine-python-2-to-python-3) with minimal downtime.


## What's Next?
Now that you know about this GAE deprecation, you may be wondering what's the big deal with App Engine anyway? What is its history, and how you can use today's GAE platform? That will be covered in the post in this series, so stay tuned. This is the first post covering Google Cloud (GCP). Expect future GCP content to cover topics like GAE bundled services, GAE migration, other serverless platforms like GCF or GCR, or other GCP compute products or its numerous APIs.


## References
- [Google App Engine product page](https://cloud.google.com/appengine)
- [All App Engine documentation](https://cloud.google.com/appengine/docs)
- [Python 2 App Engine documentation](https://cloud.google.com/appengine/docs/legacy/standard/python)
- [GAE runtime lifecycle](https://cloud.google.com/appengine/docs/standard/lifecycle/runtime-lifecycle)
- [GAE support schedule](https://cloud.google.com/appengine/docs/standard/lifecycle/support-schedule)
- [Python 2 GAE migration home page](https://cloud.google.com/appengine/docs/standard/python/migrate-to-python3)
- [Migrating away from GAE bundled services](https://cloud.google.com/appengine/migration-center/standard/services/migrating-services)
- [Python 2 GAE migration GitHub repo](https://github.com/wescpy/migrate-python2-appengine) (codelabs, videos, "before" & "after" sample apps)
- [Python 2 GAE migration codelabs](https://developers.googleblog.com/2021/03/modernizing-your-google-app-engine-applications.html?utm_source=ext&utm_medium=partner&utm_campaign=CDR_wes_aap-serverless_modernizegae_codelabsannounce_201031&utm_content=-)
- [Python 2 GAE migration videos](https://developers.googleblog.com/2021/06/introducing-serverless-migration.html?utm_source=blog&utm_medium=partner&utm_campaign=CDR_wes_aap-serverless_smsintro_201023)
- [Content on migrating from GAE to GCR](https://goo.gle/3geAqFs) (with Docker)
- [Python support on GCP](https://cloud.google.com/python)

---
<small>
**WESLEY CHUN**, MSCS, is a [Google Developer Expert](https://developers.google.com/experts) (GDE) in Google Cloud (GCP) &amp; Google Workspace (GWS), author of Prentice Hall's bestselling ["Core Python"](https://corepython.com) series, co-author of ["Python Web Development with Django"](https://withdjango.com), and has written for Linux Journal & CNET. He runs [CyberWeb](https://cyberwebconsulting.com) specializing in GCP & GWS APIs and serverless platforms, [Python & App Engine migrations](https://appenginemigration.com), and Python training & engineering. Wesley was one of the original Yahoo!Mail engineers and spent 13+ years on various Google product teams, speaking on behalf of their APIs, producing sample apps, codelabs, and videos for [serverless migration](http://bit.ly/3xk2Swi) and [GWS developers](http://goo.gl/JpBQ40). He holds degrees in Computer Science, Mathematics, and Music from the University of California, is a Fellow of the Python Software Foundation, and loves to travel to meet developers worldwide at conferences, user group events, and universities. Follow he/him [@wescpy](https://twitter.com/wescpy) & his [technical blog](https://dev.to/wescpy). Find this content useful? [Contact CyberWeb](https://forms.gle/bQiDMiGyGrrwv5sy5) or [buy him a coffee (or tea)](http://buymeacoffee.com/wescpy)!
</small>