Deploy your web service Stay organized with collections Save and categorize content based on your preferences.
Region ID
TheREGION_ID is an abbreviated code that Google assignsbased on the region you select when you create your app. The code does notcorrespond to a country or province, even though some region IDs may appearsimilar 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 moreabout region IDs.
Use theGoogle Cloud CLI todeploy your web service to App Engine.
Though this initial version of the web service doesn't haveFirestore in Datastore mode (Datastore) or Firebase authentication,you can deploy it to App Engine at this stage to test and ensure thatit 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 fromBuild a Python 3 Appand complete all the steps leading up to this one.
If you already have aGoogle Cloud project,you can continue by downloading a copy of the web service:
Download the sample application repository usingGit:
gitclonehttps://github.com/GoogleCloudPlatform/python-docs-samplesAlternatively, you candownload the sample as a zip file and then extract it.
Navigate to the directory that contains a copy of the files from theprevious step:
cdpython-docs-samples/appengine/standard_python3/building-an-app/building-an-app-1
Deploy your service
To deploy your web service, you run thegcloud app deploy command from the rootdirectory of your project, where yourapp.yaml file is located:
gcloudappdeployEach time that you deploy your web service, a newversion of thatapp is created in App Engine. During deployment, a container image iscreated using theCloud Build service, andthen a copy is uploaded to Google Cloud Storage before it is run inApp Engine.
For more information about deploying to App Engine, seeTesting and Deploying Your App.
Note: Files listed in your.gcloudignorefile are not uploaded to App Engine during deployment.Viewing your service
To quickly launch your browser and access your web service athttps://PROJECT_ID.REGION_ID.r.appspot.com, enter the followingcommand:
gcloudappbrowsehttps://PROJECT_ID.REGION_ID.r.appspot.com URL, you canadd a custom domain.Managing services and versions
You've just deployed a version of the web service to App Engine. Eachtime that you deploy a version of your code, that version is created in aservice. The initial deployment to App Engine must be created in thedefault service, but for subsequent deployments, you canspecify the name of your service in yourapp.yaml file.
You can update a service at any time by running thegcloud app deploy command and deploying new versions to that service. Eachtime that you update a service, traffic is automatically routed to the versionlast deployed. However, you can includegcloud flags to change the deploy commandbehavior.
Use the Google Cloud console to manage and view the services and versions thatyou deploy toApp Engine:
Use the Google Cloud console to view your App Engine services:
Use the Google Cloud console to view your versions:
For more information about the multi-service design pattern, seeAn Overview of App Engine.To learn how to send requests to specific services and versions, seeSplitting Traffic.
Next steps
Now that you have a Python service running on App Engine,you're ready to learn how to handle data with Datastore.
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 2025-12-15 UTC.