Questions tagged [aws-codebuild]

Describes Amazon Web Services CodeBuild questions and answers. Scope should be limited to AWS CodeBuild.

AWS CodeBuild is a fully managed build service that compiles source code, runs tests, and produces software packages that are ready to deploy. With CodeBuild, you don’t need to provision, manage, and scale your own build servers. CodeBuild scales continuously and processes multiple builds concurrently, so your builds are not left waiting in a queue. You can get started quickly by using prepackaged build environments, or you can create custom build environments that use your own build tools. With CodeBuild, you are charged by the minute for the compute resources you use.

Documentation

1448 questions
22
votes
3 answers

AWS CodeBuild error: Major version of alias '14.x' is not supported in runtime 'nodejs'

I have a confusing issue with AWS CodeBuild. I am getting the following error: Major version of alias '14.x' is not supported in runtime 'nodejs' When I update the buildspec to simply be "14" I get slightly more information on the error: Message:…
Ollie
  • 1,355
  • 1
  • 10
  • 22
22
votes
2 answers

AWS CodeBuild – Build does not have internet connectivity. Please check subnet network configuration

I am experimenting with CodeBuild but have reached a dead-end. My build always fails with the error message: Build does not have internet connectivity. Please check subnet network configuration. I checked the VPC configuration (subnet, security…
John Keyes
  • 5,479
  • 1
  • 29
  • 48
22
votes
2 answers

Is there a way to change directory on AWS codebuild

With Snap-CI going away I've been trying to get our builds working on AWS CodeBuild. I have my buildspec.yml built out, but changing directories doesn't seem to work. version: 0.1 phases: install: commands: - apt-get update -y -…
Zipper
  • 7,034
  • 8
  • 49
  • 66
21
votes
2 answers

CodePipeline: ECR source + ECS deploy configuration

Basically, I need to configure CI/CD with bitbucket source code to ECS containers. I want to use CodePipline to deploy new ECR image to ECS. Currently, there is no option in AWS CodePipline to specify bitbucket as the source. However, I've managed…
Sergey Nikitin
  • 845
  • 2
  • 13
  • 25
21
votes
5 answers

Cannot run `source` in AWS Codebuild

I am using AWS CodeBuild along with Terraform for automated deployment of a Lambda based service. I have a very simple buildscript.yml that accomplishes the following: Get dependencies Run Tests Get AWS credentials and save to file (detailed…
Tanishq dubey
  • 1,522
  • 7
  • 19
  • 42
20
votes
2 answers

AWS CodeBuild local cache failing to actually cache?

I've been trying to get AWS CodeBuild's local cache to work and for the life of me I can't get even the most basic cache to work. My ultimate goal is to cache Gradle artifacts, as discussed here. But because I couldn't get that to work, I tried an…
Patrick Lightbody
  • 4,424
  • 2
  • 28
  • 38
20
votes
4 answers

AWS Codebuild puting all artifacts in root of S3 bucket

I'm building a project that puts all of it's files in a 'dist' folder, and running it through CodeBuild. I'm trying to get it to put all of the files and folders in 'dist' into the root of the s3 bucket, but I'm having trouble figuring out how to…
Xylude Xaalud
  • 388
  • 1
  • 4
  • 11
19
votes
1 answer

What is the difference between HEAD_REF vs BASE_REF in AWS Codebuild git webhook?

I want to set a build webhook when a PullRequest is opened from dev branch to master branch. AWS Codebuild has a webhook based on HEAD_REF and BASE_REF which lacks detailed documentation. What do they stand for?
qpzm
  • 428
  • 1
  • 5
  • 13
19
votes
1 answer

CodeStar/CodeBuild Role X trusts too many services, expected only 1

I'm testing out CodeStar with the default NodeJS & serverless template. For some reason this template defaults to nodejs 8.11 for the runtime environment and 6.10 for the build environment. In order to sync them I'm attempting to override the build…
Chris Owens
  • 5,076
  • 12
  • 61
  • 131
19
votes
6 answers

AWS Codebuild fails while downloading source. Message: Access Denied

I created a CodeBuild Project that uses a docker image for node8. The purpose of this CodeBuild project is to do unit testing. It takes an input artifact from CodeCommit. And in the buildspec.yml it runs a test command. This is my (simple) buildspec…
18
votes
4 answers

Unable to update Service Role in CodeBuild with error "The policy was not attached to role"

When I create a brand new CodeBuild project, it allows me to select an IAM Service Role, and when I check the box "Allow AWS CodeBuild to modify this service role so it can be used with this build project", AWS modifies that Service Role with a…
Dalmiro Granas
  • 671
  • 1
  • 4
  • 11
17
votes
2 answers

YAML_FILE_ERROR Message: Wrong number of container tags, expected 1

I am new to AWS CodePipeline and I am getting this Error on AWS CodeBuild "YAML_FILE_ERROR Message: Wrong number of container tags, expected 1" I have setup AWS CodePipeline with CodeBuild and CloudFormation for aspnet core 2.1 project. Here is my…
Tamoj
  • 251
  • 1
  • 3
  • 9
16
votes
2 answers

How do I fix EACCES: permission denied, open

I see the following error when executing npm install -g serverless via buildspec.yml from AWS Codebuild storage-engine@3.0.7 postinstall /usr/local/lib/node_modules/serverless/node_modules/storage-engine node ./compatibility/detect.js Error:…
16
votes
2 answers

AWS CodeBuild VPC_CLIENT_ERROR: Unexpected EC2 error: UnauthorizedOperation

I created CodeBuild project in a custom VPC and in private subnet. Private subnet has internet access, also AWS console confirms that internet connection is for this code build project. I keep getting VPC_CLIENT_ERROR: Unexpected EC2 error:…
user606521
  • 14,486
  • 30
  • 113
  • 204
16
votes
3 answers

Export existing CodePipeline/CodeBuild projects to Cloudformation

Is there a way to export existing CodePipeline/CodeBuild projects to Cloudformation? I'm in the process of converting our existing CI/CD infrastructure into code so it would be easy to replicate them on other AWS regions. Currently, we've done all…
1
2
3
96 97