Practice Test 2 | Google Cloud Certified Associate Cloud Engineer | Dumps | Mock Test
Your Cloud Function is using python modules to connect to your SQL PostgreSQL database in your VPC. As such, how do you bundle your Cloud Function to add the dependencies?
A. Upload the function and import the dependencies in code so that the Cloud Function can resolve the dependencies automatically.
B. Upload the code through the Google Cloud console and upload the dependencies as the zip
C. Zip the function and the dependencies separately and upload them in Cloud Function as multi parts
D. Put the function and the dependencies in one folder and zip them together
Explanation:
Answer D
D is correct: Cloud function dependencies could be resolved by using the pip package manager’s requirements.txt file or packaging local dependencies alongside your function.
A is incorrect: Cloud Function does not download the dependencies based on the import statement in python
B & C are incorrect: Both the approaches are inappropriate to specify the dependencies of a Cloud Function
Link:
https://cloud.google.com/functions/docs/concepts/python-runtime
Comments are closed, but trackbacks and pingbacks are open.