代理对 VPC 中的 REST 数据源的 AppSync 调用

Proxying AppSync calls to a REST datasource in a VPC

我们有一个使用 REST 数据源连接到 AppSync 的 React 站点。 REST 数据源位于 VPC 内。我们需要能够代理对 VPC 的调用,而 AppSync 不支持(据我所知)与私有 VPC 的集成。

代理调用从 AppSync 到 VPC 后面的内部 REST 服务的最佳方法是什么。我可以使用 API 网关,因为它确实支持私有 VPC (https://aws.amazon.com/about-aws/whats-new/2017/11/amazon-api-gateway-supports-endpoint-integrations-with-private-vpcs/),但是当一个方法被添加到 REST 服务时,我们将不得不为每个方法创建端点,如果我们全部正在做的是代理呼叫。我们可以使用 Lambda 来代理调用,但这似乎也太过分了。

有人有什么建议吗?

"but then we would have to create endpoints for each method whenever a method is added to the REST service which seems tedious and unneeded if all we're doing is proxying calls."

不适用于 API 网关中的 HTTP PROXY integration,它只会代理它到达后端的任何请求。