0

How can I set No VPC using aws codebuild cli? I tried using:

aws codebuild update-project \
  --name <PROJECT_NAME> \
  --vpc-config vpcId='',subnets='',securityGroupIds=''

But I'm getting the error:

Invalid length for parameter vpcConfig.subnets[0], value: 0, valid range: 1-inf
Invalid length for parameter vpcConfig.vpcId, value: 0, valid range: 1-inf
Invalid length for parameter vpcConfig.securityGroupIds[0], value: 0, valid range: 1-inf
niqui
  • 1,562
  • 1
  • 16
  • 28

2 Answers2

1

Use null instead of empty string '':

--vpc-config vpcId=null,subnets=null,securityGroupIds=null
Unsigned
  • 9,640
  • 4
  • 43
  • 72
0

This is the solution that worked for me

aws codebuild update-project --name <projName> --vpc-config {}

Tim Nguyen
  • 71
  • 1
  • 2