RouteTable requirements

0

I'm trying to configure CodeBuild and it requires a VPC with a NAT gateway destination for 0.0.0.0/0 and also an InternetGateway for 0.0.0.0/0. My problem is you can only have one all zero destination in a route table and you can only have one route table per VPC. How are you supposed to configure this?

질문됨 5년 전201회 조회
1개 답변
0
수락된 답변

Hi,
Your VPC for CodeBuild will have many route tables and with the Public subnet containing the Internet Gateway route and Private subnet containing the Nat Gateway route). CodeBuild will be setup in the private subnet.

Your VPC has a main route table that routes network traffic between all of your subnets.
Dest: 10.0.0.0/16 Targ: local

In a simple case, you have a public subnet and a private subnet.

The Internet Gateway is attached to the VPC

The public subnet (10.0.0.0/24) has a route table that has the following entries
Dest: 10.0.0.0/16 Targ: local
Dest: 0.0.0.0/0 Targ: Internet Gateway.

When you create your Nat Gateway, you place it inside of the VPC, inside the public subnet. You must also first create an Elastic IP and associate that public IP with the Nat Gateway.

The private subnet (10.0.1.0/24) has a route table that has the following entries:
Dest: 10.0.0.0/16 Targ: local
Dest: 0.0.0.0/0 Targ: Nat Gateway

Here is a link that has similar info on this topic
Link: https://stackoverflow.com/questions/48522481/aws-codebuild-build-does-not-have-internet-connectivity-please-check-subnet-n

Hope this helps.
-randy

답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠