Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable VPC access for AWS CodeBuild/Code Pipeline?

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?

like image 515
Thirumal Avatar asked Oct 20 '25 13:10

Thirumal


2 Answers

Select environments from your CodeBuild project settings and in the advanced 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.

like image 101
Jyothish Avatar answered Oct 22 '25 04:10

Jyothish


This AWS Documentation guide will help you to configure your Code Build Project with your VPC.

But I am sure, you must have gone through it. Please share the error as well.

Link

like image 36
bhavuk bhardwaj Avatar answered Oct 22 '25 04:10

bhavuk bhardwaj