Getting started with Google Cloud Functions — Project Setup
Technology | September 16, 2019
Hello Everyone, I am Karan and welcome to my first blog, very excited to finally start the series on google cloud functions. In this very first blog, I am gonna talk about some advantages of Google-Cloud functions and then setting up the first project on google cloud console. If you already have a project created you can follow this blog to write/deploy API.
Good news is there is no need to setup server for you to write the REST API, but need some tools to be installed in your local to start off. You may be wondering why I said no need to setup server but why to install these tool, these tools help you to deploy the functions and to test these functions locally and these are just one-time investment, afterward, no installation for any number of the projects you work, just change of configuration. if you don’t really want to install anything, you can just code in google inline editors as well, but for a long and processed function, we should just test it in our local with our familiar editor. Let’s just get started to create a new project in GCP(Google Cloud Platform).
G-Cloud Functions Features
I am keeping it short and easily readable, for more explanation you can follow official documentation here . Following are the features and benefits.
- You don’t need to buy a server instance and manage it. google takes care of it.
- Scalability of your API is completely taken care of by the function itself.
- Pay only while your function is executing, metered to the nearest 100 milliseconds, and pay nothing after your function finishes. which means billing will be done for each API calls not on inactive functions.
- It also has basic capabilities like environmental variable supports, debugging logs, configuration and support file deployment along with API and many more.
G-Cloud Project Creation
Here we go, Just create/select your project here
Note:- You can change project name and organization(A parent folder which will contain your projects, you may divide your project types in a different organization) name respectively.
well, that’s gonna take a while.so now you can add team members and give them permission, for that just click on your project from notification or select from the left dropdown. if you see some error like below, you probably need to enable the billing (just start your free trial 😉 )
Once you successfully create your project you should see this screen (Or you can select a project from the top dropdown).
Now, We need to enable cloud function API so we can access our deployed GCloud functions.
Click on Go to APIs Overview, then click on ENABLE APIS AND SERVICES.
You can search the cloud functions API and select and enable the API.
Now, we are all set to write/deploy the first API. You can follow this blog.
Thank you so much for reading this.