Google Cloud

Google Cloud Account Setup

Create a Google Cloud account here.

Google Cloud Storage

See Google Cloud Storage.

Google Cloud Function (1rst gen)

Google Cloud Function 1rst gen is free for the first 2 million invocations per month. Beyond 2 million invocations, price is $0.40 USD for 1 million invocations.

Cloud Functions is now Cloud Run functions. 1rst gen Google Clound Function might not be available anymore 🙁

Steps:

  • Go to the Google Cloud console.
  • Click on CREATE PROJECT, or select an existing project. The project name is part of the project ID, which will be part of the function URL. Choose something stealth like “utils”, “tools”, “libraries”.
Configure an HTTP trigger in the Trigger section:

In the Trigger type field, select HTTP.
In the Authentication field, select an option depending on whether you want to allow unauthenticated invocations of your function. By default, authentication is required. See Authenticating for invocation for more information.
Select or clear the Require HTTPS checkbox to control whether the function endpoint requires HTTPS. If deselected, both HTTP and HTTPS are supported.

Allow unauthenticated invocation of a function:

Go to the Google Cloud console: https://console.cloud.google.com/functions/
Click the checkbox next to the receiving function. (Don't click on the function itself.)
Click Permissions at the top of the screen. The Permissions panel opens.
Click Add principal.
In the New principals field, type allUsers.
Select the role Cloud Functions > Cloud Functions Invoker from the Select a role drop-down menu.
In response to the dialog, click Allow public access.

After your function is deployed with an HTTP trigger, you can retrieve its assigned URL.
https://REGION-PROJECT_ID.cloudfunctions.net/FUNCTION_NAME

Go to the Cloud Run functions overview page in the Google Cloud console:
Go to Cloud Run functions
Click the name of the function whose URL you want to retrieve.
Click the Edit tab.
View your function's URL in the Trigger section.