CodeBuild 找不到目标 Internet 网关的 0.0.0.0/0 目标

编程入门 行业动态 更新时间:2024-10-25 22:28:46
本文介绍了CodeBuild 找不到目标 Internet 网关的 0.0.0.0/0 目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我已经为此苦苦挣扎了几个小时.因此,我创建了我的 VPC 以及 4 个不同的子网.前三个连接到常规 Internet 网关.最后一个连接到 NAT 网关(以 0.0.0.0/0 作为目标).我的 CodeBuild 项目设置为使用此 VPC 和最后一个子网.

I've been struggling with this for hours. So, I created my VPC, along with 4 different subnets. The first three are attached to a regular Internet Gateway. The last one is attached to a NAT Gateway (with 0.0.0.0/0 as Destination). My CodeBuild project is set to use this VPC and the last subnet.

当我在 CodeBuild 项目环境中单击验证 VPC 设置"时,收到此警告:

When I click "Validate VPC Settings" in the CodeBuild Project Environment, I get this warning:

ID 为 * 的 VPC 可能没有互联网连接.CodeBuild 找不到子网 ID 为 * 的目标互联网网关的 0.0.0.0/0 目的地."

如果我尝试运行 CodeBuild 项目,它将超时,因为它无法访问 Internet 并且无法从 CodeCommit 下载源...

If I try to run the CodeBuild project, it will timeout because it has no internet access and cannot download sources from CodeCommit...

我在这里错过了什么?我的子网的路由表附加到 NAT 网关,目标是 0.0.0.0/0,所以上面的错误消息对我没有任何意义.

What am I missing here? The Routing Table for my subnet is attached to the NAT Gateway and the Destination is 0.0.0.0/0, so the error message above doesn't make any sense to me.

谢谢!

推荐答案

所以,万一其他人遇到同样的问题,原因是我错误地将 NAT 网关放置在私有子网而不是公共子网上.

So, in case anyone else has the same issue, the reason was that I mistakenly placed my NAT Gateway on a private subnet instead of a public one.

这篇关于CodeBuild 找不到目标 Internet 网关的 0.0.0.0/0 目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-23 04:29:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1034855.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:目标   找不到   网关   CodeBuild   Internet

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!