我需要在对电子表格进行任何更改后从 Google 表格中调用 AWS Lambda 函数。我有一个 Google App 脚本,它会在对电子表格进行任何更改时执行,但需要一个 http 请求来触发 Lambda 函数。
Lambda 函数将是 NodeJS 并包含一个 gsjson 包(将 Google 表格转换为 JSON),然后使用 S3Cmd 将新创建的 JSON 文件移动到 S3 或触发另一个可以将文件移动到 S3 存储桶的 S3 Lambda 函数:
Google Sheet->Google App Script->触发 AWS API 网关?
Lambda 函数(NodeJS)->gsjson npm 模块->创建 JSON 文件->将 JSON 文件移动到 S3 存储桶
什么操作/触发器可用于从 Google App 脚本内部调用 Lambda 函数/AWS Gateway API?
最佳答案
What action/trigger can be used to invoke a Lambda function/AWS Gateway API from inside a Google App Script?
对 AWS API 网关端点(又名 GET/POST/等。一些 URL)的 HTTP 请求可以工作。可以将 API 网关配置为在调用该端点时触发 Lambda 函数。
看看 docs .
这是一个相关的 AWS Tutorial series补充。
关于javascript - 通过 Google App Script 调用 AWS Lambda 函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45887168/