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. Including
REGION_ID.r in App Engine URLs is optional for
existing apps and will soon be required for all new apps.
To ensure a smooth transition, we are slowly updating App Engine to use region IDs. If we haven't updated your Google Cloud project yet, you won't see a region ID for your app. Since the ID is optional for existing apps, you don't need to update URLs or make other changes once the region ID is available for your existing apps.
Learn more about region IDs.
gcloud tool of the Cloud SDK to
deploy your web service to App Engine.
Though this initial version of the web service doesn't have Datastore or Firebase authentication, you can deploy it to App Engine at this stage to test and ensure that it works as expected.
Before you begin
If you have completed all the previous steps in this guide, skip this section. Otherwise, complete one of the following:
Start from Building a Python 3 App and complete all the steps leading up to this one.
If you already have a Cloud project, you can continue by downloading a copy of the web service:
Download the sample application repository using Git:
git clone https://github.com/GoogleCloudPlatform/python-docs-samples
Alternatively, you can download the sample as a zip file and then extract it.
Navigate to the directory that contains a copy of the files from the previous step:
Deploying your service
To deploy your web service, you run the
gcloud app deploy command from the root
directory of your project, where your
app.yaml file is located:
gcloud app deploy
Each time that you deploy your web service, a new version of that app is created in App Engine. During deployment, a container image is created using the Cloud Build service, and then a copy is uploaded to Google Cloud Storage before it is run in App Engine.
For more information about deploying to App Engine, see Testing and Deploying Your App.
Viewing your service
To quickly launch your browser and access your web service at
https://PROJECT_ID.REGION_ID.r.appspot.com, enter the following
gcloud app browse
Managing services and versions
You've just deployed a version of the web service to App Engine. Each
time that you deploy a version of your code, that version is created in a
service. The initial deployment to App Engine must be created in the
default service, but for subsequent deployments, you can
specify the name of your service in your
You can update a service at any time by running the
gcloud app deploy command and deploying new versions to that service. Each
time that you update a service, traffic is automatically routed to the version
last deployed. However, you can include
gcloud flags to change the deploy command
Use the Cloud Console to manage and view the services and versions that you deploy to App Engine:
Use the Cloud Console to view your App Engine services:
Use the Cloud Console to view your versions:
Now that you have a Python 3 service running on App Engine, you're ready to learn how to handle data with Datastore.