Stay organized with collections Save and categorize content based on your preferences.
Region IDThe REGION_ID
is an abbreviated code that Google assigns based on the region you select when you create your app. The code does not correspond to a country or province, even though some region IDs may appear similar to commonly used country and province codes. For apps created after February 2020, REGION_ID.r
is included in App Engine URLs. For existing apps created before this date, the region ID is optional in the URL.
Learn more about region IDs.
Learn how to run your application locally, deploy it, and test on App Engine.
Run locallyTo test your application before deploying, run your application in your local environment with the development tools that you usually use.
Before deploying your applicationBefore deploying your application:
Deploy your application to App Engine using the gcloud app deploy
command. During deployment, the Cloud Build service builds a container image of your application to run in the standard environment. Each build is run in the same region as your Google Cloud project. For more information, see Manage build images.
To programmatically deploy your apps, use the Admin API.
Deploy a serviceYou deploy your application to App Engine by deploying versions of your application's services and each of their configuration files.
To deploy a version of your application's service, run the following command from the directory where the app.yaml
file of your service is located:
gcloud app deploy
Specifying no files with the command deploys only the app.yaml
file in your current directory. By default, the deploy
command generates a unique ID for the version that you deploy, deploys the version to the Google Cloud project you configured the Google Cloud CLI to use, and routes all traffic to the new version.
You can change the default behavior of the command by targeting specific files or including additional parameters:
gcloud app deploy cron.yaml gcloud app deploy dispatch.yaml gcloud app deploy index.yaml
--version
flag.--no-promote
flag.--project
flag.For example, to deploy the service defined by the app.yaml
file to a specific Google Cloud project, assign it a custom version ID, and prevent traffic from being routed to the new version:
gcloud app deploy --project PROJECT_ID --version VERSION_ID --no-promote
For more information about this command, see the gcloud app deploy
reference.
--project
every time you deploy.
When you deploy a new version with the same name as an existing version, App Engine immediately migrates traffic to the new version. There is a latency spike when App Engine loads requests to the new version. The new version overwrites the previous one, and you won't be able to migrate the traffic to the previous version. All instances of the previous version are immediately shut down. For more information, see Migrating traffic.
Deploy multiple servicesYou use the same deployment command for deploying or updating the multiple services that make up your application.
Before you begin:
default
service before you can create and deploy subsequent services.app.yaml
configuration files. To specify the service ID, include the service
element definition in each configuration file. By default, excluding this element definition from your configuration file deploys the version to the default
service.To deploy multiple services, separately deploy each service's app.yaml
file. You can specify multiple files with a single gcloud app deploy
command:
gcloud app deploy service1/app.yaml service2/app.yamlView build logs
Cloud Build streams build and deploy logs that are viewable in the Cloud Build Build history section of the Google Cloud console. To view builds in the app's region, use the Region menu to filter by the region.
Manage build imagesCaution: Container Registry is deprecated. Effective March 18, 2025, Container Registry is shut down, and writing images to Container Registry is unavailable. For details on the deprecation and how to migrate to Artifact Registry, see Container Registry deprecation.
Each time you deploy a new version:
App Engine creates a container image using the Cloud Build service.
Cloud Build builds the container image in the app's region, and runs in the App Engine standard environment.
App Engine stores built container images in Artifact Registry. You can download these images to keep or run elsewhere.
After deployment is complete, App Engine no longer needs the container images. The container images aren't automatically deleted. To avoid reaching your storage quota, you can safely delete any images you don't need. However, if you might need the images in the future or want to keep a copy of the images, you need to export a copy prior to deletion. For more information about managing images in Artifact Registry, see Manage images.
Ignore filesYou can use a .gcloudignore
file to specify files and directories that won't be uploaded to App Engine when you deploy your services. This is useful for ignoring build artifacts and other files that don't need to be uploaded with your deployment.
skip_files
field in your app.yaml
file if you have a .gcloudignore
file. View your application
After you deploy your application to App Engine, you can run the following command to launch your browser and view it at https://PROJECT_ID.REGION_ID.r.appspot.com
:
gcloud app browseTest on App Engine before shifting traffic
Before configuring a new version to receive traffic, you can test it on App Engine. For example, to test a new version of your default
service:
Deploy your new version, but prevent traffic from being automatically routed to the new version:
gcloud app deploy --no-promote
Access your new version by navigating to the following URL:
https://VERSION_ID-dot-default-dot-PROJECT_ID.REGION_ID.r.appspot.com
--version flag
. The Google Cloud CLI also outputs the version ID when you deploy.
Now you can test your new version in the App Engine runtime environment. You can debug your application by viewing its logs. For more information, see Writing Application Logs.
App Engine routes requests sent to https://PROJECT_ID.REGION_ID.r.appspot.com
to the version previously configured to receive traffic.
When you want to send traffic to the new version, use the Google Cloud console to migrate traffic:
Select the version you just deployed and click Migrate traffic.
You can use the same process to test new versions of other services by replacing default
in the URL with your service's name:
https://VERSION-dot-SERVICE-dot-PROJECT_ID.REGION_ID.r.appspot.com
For more information about targeting specific services and versions, see How requests are routed.
Use build environment variablesYou can set build environment variables for runtimes that support buildpacks.
Build environment variables are key-value pairs that you can specify to configure the buildpack you use to deploy your app. For example, you might want to specify compiler options.
Before you begin:
GOOGLE_*
key prefix.GOOGLE_RUNTIME
GOOGLE_RUNTIME_VERSION
GOOGLE_ENTRYPOINT
GOOGLE_DEVMODE
To use environment variables with buildpacks, specify the build_env_variables
field in your app.yaml
file.
Learn more about buildpacks.
Use Cloud TraceCloud Trace is useful for understanding how requests propagate through your application. You can inspect detailed latency information for a single request or view aggregate latency for your entire application.
To view trace details in Cloud Trace, you can follow Find and explore traces. In the Trace explorer, you can use the filters to filter by your specific App Engine service and version.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["The `REGION_ID` is a Google-assigned code based on the selected region when creating an app, included in App Engine URLs for apps created after February 2020, and is optional for older apps."],["Deploy applications to App Engine using the `gcloud app deploy` command, which builds a container image of the application with Cloud Build in the same region as the project."],["Use the `gcloud app deploy` command to deploy multiple services by targeting each service's `app.yaml` file separately, or include all applicable files in the same command."],["Test new versions on App Engine before routing traffic by deploying with the `--no-promote` flag and accessing it through a specific URL containing the `VERSION_ID`."],["Manage build environment variables for buildpacks by using the `build_env_variables` field in the `app.yaml` file to specify key-value pairs for build configuration."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4