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.

961 questions
10
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
  • 11,796
  • 18
  • 90
  • 180
10
votes
2 answers

AWS CodeBuild Github webhook does not update status of PullRequest

Using the official guide, created build project to run tests on GitHub PullRequests creation. The webhook is correctly shown on GitHub, builds are being triggered in Codebuild, however, the build status is not shown in Github, despite the option…
Roman Kolodiy
  • 101
  • 1
  • 3
10
votes
3 answers

AWS CodeBuild Badge update on CodePipeline trigger

I've created an AWS CodeBuild project that includes a build badge and when I trigger the build manually, all works OK (i.e. the badge is updated). I've now added a CodePipeline project that triggers that build based on a GitHub checkin. I can see…
Tirinoarim
  • 524
  • 6
  • 12
10
votes
4 answers

Getting Commit ID in CodePipeline

I am using CodePipeline with CodeCommit. Builds are triggered automatically with push to master branch. In CodePipeline console it is clearly visible that i am receiving commit id but i need to get it in the build environment so i can add them as a…
10
votes
3 answers

CodeDeploy to S3

I have a site in a S3 bucket, configured for web access, for which I run an aws s3 sync command every time I push on a specific git repository (I'm using Gitlab at the moment). So if I push to stable branch, a Gitlab runner performs the npm start…
10
votes
3 answers

How can I have multiple CodeBuild buildspec files in different directories?

I have a large monorepo with many projects in it. I want to have many build jobs, each using a buildspec in the relevant tree in the repo. For example, I have a lambda function called Email, and a java application called Web. The source trees for…
10
votes
3 answers

How to use output artifact of CodeBuild in CloudFormation?

So I have a fairly simple stack I'm trying to setup consisting of a single Lambda function subscribed to an SNS topic. I'd like to use CodePipeline with three stages: Source (GitHub) -> Build (CodeBuild) -> Deploy (CloudFormation). I managed to…
10
votes
2 answers

How to handle multiple environments in CodePipeline?

I'm using code pipeline to deploy my infrastructure and I would like to be able to deploy it in different environments (dev, staging, prod,...). I currently have a buildspec.yml file containing some "pip install" instructions and the "aws…
9
votes
2 answers

AWS CodeBuild GitHub Deploy Keys

With AWS CodeBuild you define GitHub as the source. If your repo is private, you can pass a personal token. I've built a CodeBuild process and confirmed this worked. What I'd like to do is not use a personal token, instead use a GitHub Deploy Key…
Josh
  • 7,099
  • 11
  • 65
  • 109
9
votes
3 answers

YAML_FILE_ERROR: YAML file does not exist

I'm working on to implement pipeline on AWS, but getting error YAML_FILE_ERROR: YAML file does not exist, I don't know why. I'm using github repo for mean stack project, entry file is docker-compose. Yml. thanks
Abhishek
  • 1,469
  • 1
  • 12
  • 20
9
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
  • 320
  • 4
  • 12
9
votes
3 answers

Receive "Not authorized to perform DescribeSecurityGroups" when creating new Project in AWS CodeBuild

I am trying to create a new project in AWS CodeBuild. Every time I attempt to I receive the following error: Not authorized to perform DescribeSecurityGroups Any help would be greatly appreciated.
Jackson
  • 4,801
  • 4
  • 26
  • 38
9
votes
3 answers

I get AWS ECR exit status 255 despite using AWS ubuntu containers

I am trying to build a docker container in AWS code build as a means to deploy a container to ECR, but I get this error. Error while executing command: $(aws ecr get-login --region ap-southeast-1). Reason: exit status 255 This command was run on…
Moses Liao GZ
  • 1,091
  • 4
  • 16
  • 34
9
votes
4 answers

Unable to create AWS CodeBuild Webhook

I'm trying to create a webhook via AWS CodeBuild and this is the error I receive. I've also tried creating the webhook via AWS CLI using the following command: aws codebuild create-webhook --project-name myClassifiedProjectName And I get the same…
Nysithea
  • 241
  • 2
  • 11
9
votes
4 answers

AWS CodePipeline build lacks Git history

Context: I have a CodePipeline set up that uses CodeCommit and CodeBuild as its source and build phases. My build includes a plugin (com.zoltu.git-versioning) that uses the Git commit history to dynamically create a build version number. Issue: This…
1 2
3
64 65