How to enable VPC
access for AWS CodeBuild/Code Pipeline
?
I am working on the Neptune database and it requires VPC
to access. While building code inside AWS CodeBuild
. My tests are failing because it's not able to access the Neptune database. How can I configure the pipeline to allow CodeBuild to access the VPC?
Select
environments
from your CodeBuild project settings and in theadvanced setting
section you can select VPC, subnet and security group for your project.For Subnets, choose a private subnet that has routes to your db. If internet access required,
NAT gateway
must be attached in the route table of private subnet. CodeBuild only works with Nat not with public subnet for internet access.