【问题标题】:How to access service over vpn gateway in google cloud function如何在谷歌云功能中通过 vpn 网关访问服务
【发布时间】:2020-12-22 01:29:10
【问题描述】:

我有一个场景,其中一些 HTTP 服务部署在 AWS 实例上,我想在我的 Google 云功能中私下访问它。到目前为止,我已经测试过使用 VPN 网关我可以连接谷歌和 AWS 计算实例。但现在我正在寻找如何使用不在任何 VPC 下的 Google 功能通过 VPN 网关访问服务。 有什么方法可以将我的谷歌云功能分配给 VPC,通过它我可以通过 VPN 网关调用 AWS 服务?

【问题讨论】:

  • 正确答案取决于您在 Google Cloud VPC 中使用的 VPN。 VPC 连接器不可传递(不路由到其他网络)。如果您使用 Google Cloud VPN 连接到 AWS,则可以路由到 AWS,

标签: google-cloud-platform google-cloud-functions google-cloud-networking google-cloud-vpn


【解决方案1】:

您可以在您想要的 Google CLoud VPC 中创建一个serverless VPC Connector 并将其添加到您的函数中。

在你的功能配置上,你可以选择route only the private IP through this connector, or all the requests initiated by the Cloud Functions

所以,如果你的路线是正确的,它应该可以工作!

【讨论】:

    猜你喜欢
    • 2019-05-15
    • 1970-01-01
    • 2018-09-22
    • 1970-01-01
    • 1970-01-01
    • 2019-12-19
    • 1970-01-01
    • 1970-01-01
    • 2019-09-20
    相关资源
    最近更新 更多