0
0
GCPcloud~5 mins

Function deployment and testing in GCP - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the first step to deploy a function on Google Cloud Platform?
The first step is to write your function code and prepare a deployment package or source code in a supported language.
Click to reveal answer
beginner
Which Google Cloud service is used to deploy serverless functions?
Google Cloud Functions is the service used to deploy serverless functions that run in response to events.
Click to reveal answer
intermediate
What command is used to deploy a function using the gcloud CLI?
Use the command: gcloud functions deploy FUNCTION_NAME --runtime RUNTIME --trigger-http to deploy a function with an HTTP trigger.
Click to reveal answer
beginner
How can you test a deployed Google Cloud Function?
You can test it by sending an HTTP request if it has an HTTP trigger, or by triggering the event it listens to, then checking logs or output.
Click to reveal answer
beginner
Why is it important to check logs after deploying a function?
Logs help you see if the function ran correctly or if there were errors, making it easier to fix problems.
Click to reveal answer
Which command deploys a Google Cloud Function with an HTTP trigger?
Agcloud function create myFunc --trigger-http
Bgcloud deploy function myFunc --runtime python39
Cgcloud functions start myFunc --http
Dgcloud functions deploy myFunc --runtime python39 --trigger-http
What is a common way to test a function with an HTTP trigger?
ASend an HTTP request to the function's URL
BRestart the Google Cloud project
CUpload a file to Cloud Storage
DRun a SQL query
Where can you find detailed error messages if a function fails?
AIn the Cloud Storage bucket
BIn the billing section
CIn the function's logs on Google Cloud Console
DIn the Compute Engine dashboard
Which runtime is NOT supported by Google Cloud Functions?
APython 3.9
BRuby 3.0
CJava 17
DNode.js 16
What does the '--trigger-http' flag do during deployment?
AMakes the function respond to HTTP requests
BTriggers the function on file upload
CRuns the function on a schedule
DDeploys the function without a trigger
Explain the steps to deploy a Google Cloud Function and how to test it after deployment.
Think about writing code, deploying with gcloud, then testing and checking logs.
You got /4 concepts.
    Describe why logs are important in function deployment and testing.
    Logs are like a diary for your function's actions.
    You got /4 concepts.