Email Alert when a specific file is available in GCP bucket

827 Views Asked by At

I need to get an email alert to my email when a specific file in GCP bucket is arrived/available. Which functionality/tool i can use in GCP.

2

There are 2 best solutions below

2
On

You can look at the following approach:

2
On

@Romin solution will work, you can also have a look to Eventarc and Cloud Run.

However, you can use a hack fully managed by Google Cloud.

Firstly, activate the Cloud Storage Audit Logs (be careful, if you have a lot of activity, it can generate a lot of logs and be costly).

Then, create a log based metrics on the audit logs that mentionned the file creation and with the filter on the file path (you can use the =~ operator for regex filtering)

Finally, create an alert on that metrics, and send an email when the alert is triggered