Upgrading to the App Engine Flexible Environment Latest Release

The App Engine flexible environment includes several new features and improvements which also come with changes in the way that you configure your apps. If you previously deployed your apps to a beta release of the flexible environment, use this topic to help you upgrade to the current release.

To upgrade, you must account for several changes in your app's code and App Engine configuration files. Also be aware of the following key dates to ensure that you migrate or upgrade your apps before the deprecated beta-related services are shut down:

Important dates
  • Beta deprecation date: November 15th, 2016

    On November 15th, 2016, all deployments to App Engine using the beta vm:true configuration were deprecated.

  • General availability date: March 10th, 2017

    The App Engine flexible environment (env:flex) was released for general availability on March 10th, 2017.

  • Beta decommission date: December 15th, 2017

    On December 15th, 2017, the Managed VMs environment (vm:true) will be shut down and all apps using the beta vm:true configuration will stop receiving traffic.

Upgrading to the flexible environment

The past beta releases of the flexible environment have been deprecated, but configurations that were previously deployed with vm:true will continue to work until the decommission date, December 15th, 2017. On that date, all apps using vm:true will stop serving traffic and are required to upgrade to the env:flex configuration.

To upgrade to the flexible environment:

  1. Update your app.yaml configuration file by replacing the deprecated vm: true entry with env: flex. Example:

    runtime: nodejs
    env: flex
  2. Depending on your app and configuration, you might also need to update that same app.yaml file to account for environment variable changes and the other breaking changes.

    Review the list of breaking changes below to determine what additional changes are required in your app.yaml.

  3. While you are upgrading your app for the flexible environment, you should also consider making changes to utilize the new features.

  4. After you have made the necessary changes, deploy the new version of your app to App Engine.

    For example, from the root directory of your app where your app.yaml file is located, you can run:

    gcloud app deploy

Breaking changes

Upgrading to the App Engine flexible environment requires a few changes to your code and configuration files. This section includes deprecations and breaking changes that you must address before deploying your app with the env: flex configuration.

Library deprecations

The following libraries and their related services were deprecated on November 15th, 2016, and are not supported in the flexible environment:

app.yaml changes

Replace the deprecated configuration vm:true in your app.yaml file, with the flexible environment setting env:flex.

Authentication changes

You must also update the app.yaml file to remove or replace the other configuration setting that have been deprecated:

  • Secure handlers
    The secure setting under handlers is now deprecated for the App Engine flexible environment. If you need SSL redirection, you can update your application code and use the X-Forwarded-Proto header to redirect http traffic. You can also use the HTTP Strict Transport Security response header.
  • Login handlers
    The login setting under handlers is now deprecated for the App Engine flexible environment. You should follow the guidance for User service migration.

Environment variable changes

The following environment variables have been removed or renamed. When available, the replacement environment variable has been listed:

Deprecated environment variable New environment variable (where applicable)

Request header changes

The following HTTP request headers have changed:

  • Removed from all requests:

  • Now included with all requests:


Memcache service

The Memcache service is currently not available for the App Engine flexible environment. An alpha version of the memcache service will be available shortly. If you would like to be notified when the service is available, fill out this early access form.

If you need to cache application data immediately, you can use Redis Labs Redis Cloud, a third party fully-managed service. To access this service, see Caching Application Data Using Redis Labs Redis.

Task queues

The Task Queue API has limited availability outside of the standard environment. If you want to use the service outside of the standard environment, you can sign up for the Cloud Tasks alpha.

In many cases where you might use pull queues, such as queuing tasks or messages that will be pulled and processed by separate works, Cloud Pub/Sub is a good alternative that offers similar functionality and delivery guarantees.

URL routing changes

You can no longer route traffic to specific instances for apps that are running in the flexible environment. For example, you cannot direct requests to instance instanceID:


New features to consider when upgrading

Take note of the following improvements that you can take advantage of when upgrading your app:

Pricing changes

The App Engine flexible environment release introduces a new pricing model. Customers who are currently using vm:true will receive one year of raw Compute Engine pricing. To view the new prices for the flexible environment, see Costs for flexible environment instances.

Tip: Spending limits are not supported in the flexible environment. You should consider creating budgets and setting alerts.

Send feedback about...

App Engine flexible environment for Node.js docs