GCP Cloud Function - MRLIVING/Becca GitHub Wiki
TOC
Overview
- Why we need cloud functions?
Ans. Connect and Extend Cloud Services based on event driven framework
Pub/Sub)
View from Message Exchange System (e.g.- The Plugins in Horae
Competitors
Language runtimes
So far, cloud functions can be written in Node.js, Python, and Go.
Types of Cloud Functions
HTTP
- Authenticating for invocation
curl -H "Authorization: bearer $(gcloud auth print-identity-token)" https://${REGION-PROJECT_ID}.cloudfunctions.net/${FUNCTION_NAME}
- Internal traffic only
Background
Events
Cases Practice
- Simple Restful Http server in few clicks
- Streaming data from Cloud Storage into BigQuery
Notes
-
Configuring Serverless VPC Access
- Can I connect a Cloud Memorystore for Redis instance to a resource from a different region?
No. A resource must be in the same region as a Redis instance to connect to it. (see here)
- Can I connect a Cloud Memorystore for Redis instance to a resource from a different region?
-
What kind of jobs does the cloud function good at?
-
How to set the Timezone of the cloud function?
- set the environment variable
TZ Asia/Taipei
.
- set the environment variable
-
How to access the local file system?