I am doing the lab on the google cloud. Currently, the new file didn’t trigger the subscription. And I want to know why?
I jumped to the console, I can see topic and subscription, but I couldn’t find where the relationship is set between the topic and the bucket, could you let me know how to do that? More in details, could you describe how
gsutil notification create works behind the hoods? Thank you.
As you discovered, you need to configure the relationship between the bucket and topic with the gsutil command. This sets up notifications that will be published to the topic when an object is written to the bucket.
See https://cloud.google.com/storage/docs/gsutil/commands/notification for more details.
That is correct, thank you.
I did a bit research and found out: currently we cannot set notification for storage via console, check: https://cloud.google.com/storage/docs/reporting-changes
To debug the functions, we can either look at the logs in the function or test by passing a mocked data.