【问题标题】:AWS App Runner service cannot access Internet when added to a VPCAWS App Runner 服务在添加到 VPC 时无法访问 Internet
【发布时间】:2022-07-08 03:16:14
【问题描述】:

我设置了一个 AWS App Runner 服务,它运行良好。目前用于联网,它被配置为公共访问,但我想将其更改为 VPC,以便我可以将服务连接到 RDS 实例,而无需向全世界开放数据库。

当我更改网络配置以使用我的默认安全组时,该服务无法访问 Internet。从 Bitbucket 克隆 git repo 会出现错误:ssh: Could not resolve hostname bitbucket.org: Try again

... 并尝试运行 npm install 会出现: npm ERR! network request to https://registry.npmjs.org/gulp failed, reason: connect ETIMEDOUT 104.16.24.35:443

我的安全组有一个传出规则,允许所有流量传出到任何目的地。我的 RDS 实例在同一个 VPC/安全组中,我可以毫无问题地连接到这个(目前我已经向全世界开放了端口 3306)。我从一堆谷歌搜索中读到的其他一切似乎都很好:路由表、互联网网关、防火墙规则等。

任何帮助将不胜感激!

【问题讨论】:

    标签: amazon-web-services amazon-app-runner


    【解决方案1】:

    可能为时已晚,无法真正提供帮助,但将 App Runner 移至 VPC 会将所有传出流量发送至 VPC。 文档中给出的两个选项是

    1. 为每个 VPC 添加 NAT 网关 2.设置VPC端点

    记录在选择子网时的注意事项部分的第一个要点中 https://docs.aws.amazon.com/apprunner/latest/dg/network-vpc.html

    【讨论】:

      猜你喜欢
      • 2018-12-25
      • 2021-12-26
      • 2019-11-07
      • 2017-10-20
      • 2016-12-31
      • 2018-12-18
      • 2019-12-06
      • 2019-10-28
      • 1970-01-01
      相关资源
      最近更新 更多