Google Cloud Storage 上传触发器 python Cloud Function 的应用替代品

Google Cloud Storage upload triggers python app alternatives to Cloud Function

我想知道当文件上传到 Google 云存储时触发的 python 应用程序的最佳架构是什么,进行一些处理并将文件输出到 Google开车?

我试过使用 Cloud Functions,但我在日志中得到 Function invocation was interrupted. Error: memory limit exceeded.

我也遵循了本教程Trigger Cloud Run with events from Eventarc,所以我知道一种方法是使用 EventArc 和 Cloud Audit 日志。

2 个问题:

  1. 因为我需要更高的内存限制,还有哪些其他方法?
  2. 如何从云审计日志中获取桶名和文件名?通过 protoPayload.resourceName?

您可以使用 PubSub。您可以创建 PubSub notification 并创建对所需服务的推送订阅。

  • http云函数
  • 应用引擎
  • 云运行
  • 某处的任何 HTTP 服务运行(虚拟机、Kubernetes、本地...)

EventArc 主要是这个过程的包装器,只能调用 Cloud 运行 服务(目前)