Hi,
I am unable to receive credit for
lab - "Cloud Functions: 3 Ways: Challenge Lab"
task - "Task 2. Create, deploy, and test a Cloud Storage function (2nd gen)"
even though the function triggers when I upload a file.
Is there an issue with the lab or am I doing something wrong?
Thanks
Solved! Go to Solution.
Use entry point same as function name for example
gcloud beta functions deploy cs-logger \
--gen2 \
--runtime nodejs16 \
--entry-point cs-logger \
--source . \
--region $REGION \
--trigger-bucket $BUCKET \
--trigger-location $REGION \
--max-instances 2
Note: If you get permissions error, please wait a few minutes and try the deployment again. It takes a few minutes for the APIs to be enabled
I waited 20 minutes and still getting the following
"Please create a cloud storage function with required maximum instances." for task 2
and
"Please create http Function with required maximum and minimum instance." for task 3
I guess I won't be getting the "level 2" badge
Use 'gcloud beta functions deploy' command to deploy function and you will be good to go 👍
Same issue, the functions works just cannot get credit. Here are my commands, is there something with it?
gcloud beta functions deploy cs-logger \
--gen2 \
--runtime nodejs16 \
--entry-point eventStorage123 \
--source . \
--region $REGION \
--trigger-bucket $BUCKET \
--trigger-location $REGION \
--max-instances 2
gcloud beta functions deploy http-responder \
--gen2 \
--runtime nodejs16 \
--entry-point helloWorld123 \
--source . \
--region $REGION \
--trigger-http \
--timeout 600s \
--min-instances 1 \
--max-instances 2
Use entry point same as function name for example
gcloud beta functions deploy cs-logger \
--gen2 \
--runtime nodejs16 \
--entry-point cs-logger \
--source . \
--region $REGION \
--trigger-bucket $BUCKET \
--trigger-location $REGION \
--max-instances 2
Thank you! 😀 The entry point has to be the SAME name as the function
You're welcome 🙌
User | Count |
---|---|
27 | |
15 | |
2 | |
2 | |
1 |