Access legacy bundled services for Go Stay organized with collections Save and categorize content based on your preferences.
This page describes how to install and use the bundledservices with theGo runtimefor App Engine standard environment. Your app can access the bundled servicesthrough theApp Engine services SDK for Go.
Before you begin
- Refer to thelist of legacy bundled services APIsyou can call in the Go runtime.
- Before starting a migration project to Go, see theruntime migration overviewandmigration considerations when using legacy bundled services.
Installing the App Engine services SDK
In order to call the legacy bundled services APIs with Go, youmust use the latest SDK. Follow these steps:
Update your
app.yamlfile to include the following line:app_engine_apis:trueAdd a reference to the latest SDK in your
go.modfile by runninggo getin the terminal as follows:gogetgoogle.golang.org/appengine/v2The main difference when upgrading to Go is using v2 of the App Engine services SDK.
In your app, modify your import statements by inserting
/v2/in the oldpackage names. For example, if using Memcache, do the following:import("google.golang.org/appengine/v2""google.golang.org/appengine/v2/memcache")For the full list of available package names, see thelegacy bundled services API references documentation.
Run
go mod tidyto clean up references in yourgo.modfile.gomodtidy
go mod tidy and find thatit is still importing an older version of the App Engine services SDK for Go,you have probably missed upgrading an import statement.Migration considerations
You should be aware of the following considerations if you are migrating tothe Go runtime and your app uses legacy bundled services:
- To test the legacy bundled services functionality in your Go app,run your application in your local environmentwith the development tools that you usually use, such as
go run. - To deploy your app, use the
gcloud app deploycommand.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-05 UTC.