Deploying API via Google App Engine

Michael Chon
Google Cloud - Community
2 min readAug 18, 2017

Google App Engine is a tool in Google Cloud Platform that lets you simply deploy your app without worrying too much about infrastructure. In this summer, I have come across this tool to deploy an API for Caila and learned how simple it is to deploy your app via Google App Engine. There is an equivalent product from Amazon Web Services, called Elastic Beanstalk, that functions the same but as a Google lover, I would like to quickly go thru the steps I took to demonstrate. As an introduction to this product, you may watch https://www.youtube.com/watch?v=s1g4H4-MSJg.

In comparison to AWS Elastic Beanstalk, Google App Engine is very easy to use; with GAE, all you need to do is code your app and deploy it to Google Cloud infrastructure without configuring and managing the servers on your own(EC2, Database, Load Balancer, etc.).

Google Cloud Team already offers lots of python sample codes in Github that you can play with via App Engine. However, for demonstration, I have created an simple API using Flask on Python3.5, as provided here https://github.com/mchon89/Google_App_Engine_Demo. Here are the steps to deploy a flask app using App Engine:

the screenshot of the API code
  1. Install Google SDK on your local computer and make sure you go thru the authentication process
  2. Enable App Engine API on the Google Cloud console
  3. Go to the folder where your code is sitting in and make sure you have the YAML and requirement text files, as referenced in my Github repository.
  4. Enter ‘gcloud app deploy’ on your terminal

I was pretty astonished how simple this was. As long as you can write a simple app code, deploying your app is not hard as you think; going thru this process would not take longer than 10 mins if you have a working code already. For more details, you can always go to the App Engine documentation and learn more, https://cloud.google.com/appengine/docs/.

--

--