1,439 questions
-2
votes
0
answers
50
views
Code build issue during Selenium grid4 upgrade [closed]
Recently I was asked to upgrade Selenium grid3 to grid using code build. Post deploying the infra using terraform, when I am trying to build a solution using code build, my build always fails at ...
1
vote
1
answer
63
views
AWS Codebuild - Install .NET 9 SDK
.NET 9 runtime isn't available (yet) for AWS Codebuild. Even after installing the SDK using the following commands, my build would still get .NET 6 instead:
version: 0.2
env:
shell: bash
phases:
...
0
votes
1
answer
45
views
Does codebuild make multiple calls to secret manager if secret names are the same?
I am storing database credentials in Secret Manager as a stringified JSON. I want CodeBuild to fetch the secret and then set one of the JSON params as an environment variable. If I do this multiple ...
2
votes
1
answer
106
views
How to make Renovate use AWS CodeArtifact as npm registry in AWS CodeBuild?
I am trying to run Renovate inside AWS CodeBuild with AWS CodeCommit (source repo) and AWS CodeArtifact (private npm registry).
Here is my buildspec.yml:
version: 0.2
env:
shell: bash
git-...
0
votes
0
answers
36
views
Missing account id on webhook release event
I am trying to setup a webhook trigger in CodeBuild from GitLab. The goal is to run a CodeBuild project when I create a new release in GitLab.
From what I understand this config should do the trick:
...
0
votes
0
answers
46
views
CODEBUILD_SRC_DIR in AWS CodeBuild points to unexpected path — how is it constructed?
I'm using AWS CodeBuild to build a project hosted in AWS CodeCommit.
My build environment uses the amazonlinux-x86_64-standard:5.0 image.
In my build project settings:
Source: AWS CodeCommit
...
0
votes
0
answers
38
views
AWS CodeBuild - prevent command echo
I have an AWS CodeBuild buildspec.xml that has some functions defined. I would like to prevent each of my commands from being echoed.
I did not find a property in the buildspec documentation to ...
0
votes
1
answer
164
views
Cannot connect to the Docker daemon when using custom Docker image in managed AWS CodeBuild environment
I want to use a custom Docker image in a managed AWS CodeBuild environment. Previously, I had successfully used the provided image Amazon Linux 2023 x86_64 standard:5.0, which comes with pre-installed ...
0
votes
3
answers
117
views
Java/gradle project that builds locally doesn't build in AWS/CodeBuild/Docker
Sorry I can't post everything, there is a lot of code - hopefully this is ok
System:
Oracle Linux 9
Java Corretto 17
Gradle 7.6
The layout of my project is
main
subproject_1
subproject_2
subproject_3
...
1
vote
1
answer
94
views
How can I fetch a commit message in AWS CodePipeline/CodeBuild to implement a `[skip ci]` command?
I'm using an AWS CodePipeline with GitHub Connections as the source action to deploy a Python app to an AWS Elastic BeanStalk. I’d like to emulate GitHub Actions' [skip ci] feature by detecting a ...
2
votes
1
answer
209
views
CI/CD pipeline design: Single vs. Separate pipelines for test/prod environments
I'm seeking wisdom on CI/CD pipeline design.
I primarily work in infrastructure and am currently tasked with designing and building a CI/CD pipeline for the first time. While I've used Git personally, ...
0
votes
1
answer
32
views
.NET / dotnet script (CSX) execution in AWS CodeBuild not resolving IAM Role
We have a AWS CodeBuild Project configured with an IAM Role with the required permissions to interact with some AWS services, in this case a DynamoDB table. We are executing a dotnet-script (CSX) ...
0
votes
0
answers
128
views
Strapi TypeError [ERR_INVALID_URL]: Invalid URL on AWS
I have Strapi headless being built in AWS CodeBuild and CodePipeline and then hosted on and run on ECS. All the logs are showing the secrets values, the database values, host, port, admin URL that is ...
1
vote
1
answer
790
views
AWS Codebuild error access denied to connection
I'm trying to create my webscraper project and I'm following this guide: "https://github.com/thejoeosborne/scheduled-scraper-example". I uploaded all the account ids and regions in my fork ...
0
votes
0
answers
62
views
How can I obtain secondary sources in codebuild project that is part of a codepipeline
I have a CodeBuild project setup via Terraform, and I've specified secondary sources like
secondary_sources {
git_clone_depth = 0
location = "https://github.com/...repo-a...&...
0
votes
1
answer
73
views
Why does my AWS CodeBuild project fail to create a CloudFormation stack with the error "Template file not found"?
I am working on automating the deployment of a static website using AWS CodePipeline and CodeBuild, along with CloudFormation. However, I am encountering some issues in my buildspec.yml configuration.
...
0
votes
1
answer
159
views
"AWS CodeBuild Error: 'Unable to initialize cache download: no paths specified to be cached' in Buildspec.yml"
I am encountering an issue during the PRE_BUILD phase in AWS CodeBuild. My buildspec script attempts to connect to a MySQL database to verify connectivity, but the connection fails with the following ...
0
votes
1
answer
156
views
AWS CodeBuild + CodePipeline: "CLIENT_ERROR Message: no matching base directory path found for dist"
I am trying to build the node app through the AWS CodeBuild service and every time its failing with the same error "CLIENT_ERROR Message: no matching base directory path found for dist"
...
0
votes
1
answer
41
views
Predefined CloudFormation stack running as root causes "CodeBuild is not authorized to perform: sts:AssumeRole on service role"
I'm working on deploying an AWS Telco Network and have followed the documentation in doing so along with their sample code, however on the final instantiation step I keep getting an sts:AssumeRole not ...
0
votes
2
answers
289
views
AWS CodePipeline not extracting artifact before deployment
I am trying to set up a CI/CD for my GitHub repo using CodePipeline. I have set up all stages:
In the Source stage, the action provider is GitHub. It links my repository. The entire code pipeline is ...
0
votes
2
answers
107
views
AWS CodePipeline: GitHub > CodePipeline (CodeBuild - Maven Java .WAR) > S3/CodeArtifact > Elastic Beanstalk (Apache Tomcat)
I feel as though I've trawled the entire internet and SO previous questions and tested every combination and permutation to try and get this working, but nothing at all I try works. I cannot seem to ...
1
vote
0
answers
354
views
Source Maps Not Correctly Mapping Stack Trace in Sentry for Node js
I'm trying to trace where errors occur in my code using Sentry. To achieve this, I'm uploading source maps to Sentry during the build stage in CodeBuild. In the post_build phase, I use these commands:
...
1
vote
3
answers
379
views
AWS Codebuild: "No such file or directory"
I have an AWS Codebuild project that should build my eleventy project.
When the project runs npx @11ty/eleventy I can the following error:
/codebuild/output/src3281352166/src/node_modules/.bin/...
2
votes
1
answer
526
views
buildspec.yaml not found- AWS codebuild failed
Based on my search, this could happened only when buildspec.yaml file is not there in the root folder. But in my repo buildspec.yaml file is there in the root folder.
while building the code using AWS ...
0
votes
0
answers
90
views
Yarn workspaces build\deploy issue with AWS CodeBuild to ElasticBeanstalk
I have a monorepo with frontend, backend and my-common yarn workspaces.
+-- node_modules
+-- package.json
+-- tsconfig.json
+-- buildspec.yml
+-- my-common
| +-- package.json
| +-- ...
-1
votes
1
answer
50
views
Error reporting failure to CodePipeline: JobNotFoundException: Job with id 'JobId' does not exist
screenshot 1enter image description hereI am getting error in codeBuild saying JobId not found. Below is the code i am using
`putPipelineFailure(error) {
return new Promise((resolve, reject) => {
...
0
votes
1
answer
69
views
I am facing these error while executing build.yml in AWS codebuild
Error response from daemon: login attempt to ***/v2/ failed with status: 403 Forbidden
[Container] 2024/08/03 09:13:53.450561 Command did not exit successfully echo "$DOCKER_REGISTRY_PASSWORD&...
0
votes
1
answer
135
views
Permissions error when trying to get codebuild to push to ECR AWS because it's registering as an unknown user
As the title suggests, my codebuild is not letting me fulfill my buildscript to push the docker image to ECR. It works perfectly when on my local machine, but not in codebuild. The error message is ...
1
vote
2
answers
1k
views
Github Actions pipeline running in AWS Codebuild hangs with waiting for runner
I have a reusable workflow that I have created in Github Actions, it uses AWS CodeBuild as a runner i.e.
jobs:
docker:
runs-on: codebuild-XXX-XXX-${{ github.run_id }}-${{ github.run_attempt }}
...
1
vote
0
answers
44
views
How to prevent AWS CodePipeline from Deploying Service in ECS When Image Hasn't Changed?
AWS CodePipeline Deploys Unchanged Images in ECS
I am deploying multiple services using AWS CodePipeline and CodeBuild. The pipeline has been set up using AWS Copilot with the following commands:
...
1
vote
0
answers
115
views
AWS CodeBuild AccessDeniedException for secretsmanager despite correct IAM policies
I'm setting up a CI/CD pipeline using AWS CodePipeline and AWS CodeBuild to deploy a Docker application running on an Elastic Beanstalk instance. The Docker credentials are stored in AWS Secrets ...
0
votes
1
answer
176
views
How to build project with AWS CodeBuild using different Personal Access Tokens from Github?
I am building my own app deployment platform where users can create a project by connecting to Github and then they can choose which repo they want to build and host using my platform. You can compare ...
1
vote
2
answers
483
views
AWS CodeBuild as Github actions runner – change folder
I have a Github actions workflow that consists of two dependent jobs:
Job A does change detection: Which modules in my monorepo changed.
Job B is a matrix job, iterating of all changed modules (the ...
-1
votes
1
answer
29
views
AWS CodeBuild Fails with YAML_FILE_ERROR When Running Python Script in buildspec.yml
I’m trying to run a Python script in AWS CodeBuild using a buildspec.yml file. The Python script is supposed to send an email using AWS SES. Here’s the relevant part of my buildspec.yml:
version: 0.2
...
1
vote
0
answers
112
views
Nuget enforce HTTPS only traffic from AWS CodeBuild
I am running an AWS CodeBuild project to build, test and publish a .NET 8 application locally (within CodeBuild) and then running it as part of an integration test. The CodeBuild project is running/...
0
votes
1
answer
187
views
Using aws codebuild pipeline variables in Cypress
I'm having issues using pipeline variables i setup on aws codebuild with cypress. Basically I don't know how to call them from my Cypress code.
Example of my buildspec.yml
version: 0.2
env:
...
0
votes
0
answers
175
views
Configuring Notifications for CodeBuild in Terraform
I'm trying to configure sns (slack) notifications for CodeBuild in Terraform. By that I mean the 'create notification' lable in the console when we click on "actions". However, I couldn't ...
2
votes
1
answer
4k
views
Terminate playwright test on test fail
I have a codebuild project where I have some playwright tests running. I want the build to fail whenever a test fails, but when the test fails it just hangs and the log tells us to terminate with Ctrl ...
1
vote
2
answers
445
views
aws codebuild, correto21 and docker not selectable
I do not see a way to use correto21 (java 21) to build a docker image in aws. For EC2 codebuilds, there is only up to correto11, where is the option for correto21 or 17? I see an option for lamda, and ...
0
votes
1
answer
611
views
ECR image push from AWS CodeBuild saying region is missing
I am trying to connect my AWS ECR to AWS codebuild through pushes to github. However, every time I push the build is erroring at logging into the ECR. I have gone into the IAM roles for the codebuild ...
0
votes
1
answer
107
views
AWS Pipeline; NextJS; Not all artifacts are uploaded on EC2 instance; GitHub -> CodeBuild -> CodeDeploy
I am using NextJS to build a frontend application.
My code base is stored on GitHub.
I use codepipeline to create a pipeline and deploy it on an EC2 instance with Ubuntu on it.
The issue:
After my ...
0
votes
1
answer
48
views
AWS CodePipeline Deploy stage Can't Access Dockerfile During Deploy Stage
During the Deploy stage in AWS CodePipeline I receive the following error:
[ERROR] An error occurred during execution of command [app-deploy] - [Docker Specific Build Application]. Stop running the ...
3
votes
1
answer
534
views
AWS Local build thinks something is too old but won't say what
I tried setting up AWS codebuild so I could do a local build on AWS. I followed the guidance on https://docs.aws.amazon.com/codebuild/latest/userguide/use-codebuild-agent.html
After doing the setup, I ...
1
vote
1
answer
348
views
NextJs deployed on Elastic Beanstalk error in production
I have a NextJs (v14.1.0) application deployed on AWS Elastic Beanstalk. The project is deployed using AWS Codebuild (buildspec.yml). It was working perfectly then I started getting a 500 internal ...
0
votes
1
answer
76
views
S3 Logs not getting populated in case of timeout build in CodeBuild
I am seeing a very weird behaviour, where my codebuild is not populating logs when it is experiencing timeout in any of its phases. It correctly populates S3 logs in case of success or failure ...
0
votes
1
answer
34
views
Continue execution after PR is merged
I am running a script inside of AWS CodeBuild (which is a part of a State Machine). Script creates a pull request in GitHub. I need to stop/pause execution, and continue/resume it only when the PR was ...
0
votes
1
answer
310
views
Deploy Nextjs app with React Big Calendar on AWS Codebuild failed
I encountered an error while deploying my project on AWS CodeBuild. The error message was related to react-big-calendar library, but I am unsure what caused it. I'm using Nextjs 13.4.2, Node 18.6.0. ...
4
votes
2
answers
16k
views
Unable to install mysql on Amazon Linux 2023
I'm trying to run the following command in my buildspec.yaml (on AWS Codebuild) to insert my React App's source version into MySQL during the build.
- echo "Saving value to MySQL RDS"
- ...
1
vote
1
answer
2k
views
CodeBuild project with .NET 8 SDK install success using .NET 6 with publish command
We are using the AWS provided aws/codebuild/amazonlinux2-x86_64-standard:5.0 CodeBuild image and installing the .NET 8 SDK in our buildspec file with:
/usr/local/bin/dotnet-install.sh --channel 8.0
...
0
votes
2
answers
1k
views
Reading an Environment Variable set at CodePipeline from a CodeBuild buildspec.yml
I've setup an AWS CodePipeline named test-pipeline-flow.
The Source step has being set to use an AWS CodeCommit named test-repo.
The Build step has being set to use an AWS CodeBuild named test-build-...