RouteTable requirements


I'm trying to configure CodeBuild and it requires a VPC with a NAT gateway destination for and also an InternetGateway for 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?

asked 3 years ago22 views
1 Answer
Accepted Answer

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: 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 ( has a route table that has the following entries
Dest: Targ: local
Dest: 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 ( has a route table that has the following entries:
Dest: Targ: local
Dest: Targ: Nat Gateway

Here is a link that has similar info on this topic

Hope this helps.

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions