如何使用专用子网配置AWS CodeBuild?

时间:2019-04-27 09:18:48

标签: amazon-web-services github amazon-rds amazon-vpc aws-codebuild

我正在设置AWS Codebuild,并且如果我在应用程序中连接了公共RDS并且没有将VPC配置连接到Codebuild,我就能成功构建。

出于安全原因,我已经为应用程序创建了一个专用RDS并在代码构建中配置了VPC,但是我正在验证代码构建中的VPC配置

The VPC with ID vpc-XXXX might not have an internet connection. 
CodeBuild cannot find the 0.0.0.0/0 destination for the target 
internet gateway with subnet ID subnet-XXXXX.

具有两个子网(子网1和子网2)的VPC

“ Subnet1(公共)具有应用程序,路由表如下”

0.0.0.0/0 - internet gateway
Associated to subnet1

“ Subnet2(专用)具有rds,路由表如下”

0.0.0.0/0 - NAT gateway(subnet2)
Associated to subnet2 

我已经使用子网2创建了RDS。

“ Codebuild vpc配置位于下面”

VPC - VPC-XXXX
Subnet - subnet2(private)

0 个答案:

没有答案